diff options
Diffstat (limited to 'libsettings/src/setting.cpp')
-rw-r--r-- | libsettings/src/setting.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libsettings/src/setting.cpp b/libsettings/src/setting.cpp index a224ad39..1a4f9e13 100644 --- a/libsettings/src/setting.cpp +++ b/libsettings/src/setting.cpp @@ -26,9 +26,16 @@ QVariant Setting::get() const { SettingsObject *sbase = qobject_cast<SettingsObject *>(parent()); if (!sbase) + { return defValue(); + } else - return sbase->retrieveValue(*this); + { + QVariant test = sbase->retrieveValue(*this); + if(!test.isValid()) + return defValue(); + return test; + } } QVariant Setting::defValue() const |