diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-09-07 09:06:00 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-07 14:37:18 -0700 |
commit | 2ecbea3d24529b9776acb620c82af04a076b817f (patch) | |
tree | 0b0fc4eec864ff79db095d775341085cb1315895 /core/settings/qPrefUpdateManager.cpp | |
parent | db57a633d587444a7196c8d4274b8f327e77ceba (diff) | |
download | subsurface-2ecbea3d24529b9776acb620c82af04a076b817f.tar.gz |
qPref: use helper function to ensure key/name grouping
We had a couple of instances of names being incorrectly merged with their
group, this should handle that better. It's a bit of a big hammer to use, but
it seems to work (and it makes it easy to then git grep for cases that don't
use the new helper function.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings/qPrefUpdateManager.cpp')
-rw-r--r-- | core/settings/qPrefUpdateManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/settings/qPrefUpdateManager.cpp b/core/settings/qPrefUpdateManager.cpp index 15ede6c5d..97ccead6d 100644 --- a/core/settings/qPrefUpdateManager.cpp +++ b/core/settings/qPrefUpdateManager.cpp @@ -30,7 +30,7 @@ void qPrefUpdateManager::loadSync(bool doSync) } -HANDLE_PREFERENCE_BOOL_EXT(UpdateManager, "/DontCheckForUpdates", dont_check_for_updates, update_manager.); +HANDLE_PREFERENCE_BOOL_EXT(UpdateManager, "DontCheckForUpdates", dont_check_for_updates, update_manager.); void qPrefUpdateManager::set_dont_check_exists(bool value) { @@ -42,7 +42,7 @@ void qPrefUpdateManager::set_dont_check_exists(bool value) } -HANDLE_PREFERENCE_TXT_EXT(UpdateManager, "/LastVersionUsed", last_version_used, update_manager.); +HANDLE_PREFERENCE_TXT_EXT(UpdateManager, "LastVersionUsed", last_version_used, update_manager.); void qPrefUpdateManager::set_next_check(const QDate& value) @@ -57,9 +57,9 @@ void qPrefUpdateManager::set_next_check(const QDate& value) void qPrefUpdateManager::disk_next_check(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/NextCheck", prefs.update_manager.next_check, default_prefs.update_manager.next_check); + qPrefPrivate::propSetValue(keyFromGroupAndName(group, "NextCheck"), prefs.update_manager.next_check, default_prefs.update_manager.next_check); else - prefs.update_manager.next_check = qPrefPrivate::propValue(group + "/NextCheck", 0).toInt(); + prefs.update_manager.next_check = qPrefPrivate::propValue(keyFromGroupAndName(group, "NextCheck"), 0).toInt(); } HANDLE_PROP_QSTRING(UpdateManager, "UpdateManager/UUID", uuidString); |