diff --git a/core/settingsservice.h b/core/settingsservice.h index 4015545..3f137e9 100644 --- a/core/settingsservice.h +++ b/core/settingsservice.h @@ -40,8 +40,9 @@ public: for (int i = 0; i < objSettings->metaObject()->propertyCount(); i++) { - const char *propName = objSettings->metaObject()->property(i).name(); - QVariant varVal = val.toObject()[propName].toVariant(); + const char *propName = objSettings->metaObject()->property(i).name(); + QJsonValue v = val.toObject()[propName]; + QVariant varVal = v.toVariant(); objSettings->setProperty(propName, varVal); }