Fixed saving of enums to json settings. Added global enum for rounding.
This commit is contained in:
+13
-1
@@ -8,6 +8,7 @@
|
||||
#include <QMetaProperty>
|
||||
|
||||
#include <QDecDouble.hh>
|
||||
#include <QDebug>
|
||||
|
||||
#include "data/system.h"
|
||||
#include "service.h"
|
||||
@@ -50,8 +51,19 @@ public:
|
||||
{
|
||||
QDecDouble dec(TO_DEC(varVal.toInt()));
|
||||
varVal = QVariant::fromValue(dec);
|
||||
objSettings->setProperty(propName, varVal);
|
||||
continue;
|
||||
}
|
||||
|
||||
// all other numbers are int
|
||||
if (varVal.toInt() > 0)
|
||||
{
|
||||
objSettings->setProperty(propName, varVal.toInt());
|
||||
}
|
||||
else
|
||||
{
|
||||
objSettings->setProperty(propName, varVal);
|
||||
}
|
||||
objSettings->setProperty(propName, varVal);
|
||||
}
|
||||
|
||||
return settingsObj;
|
||||
|
||||
Reference in New Issue
Block a user