mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
db57a633d5
commit
2ecbea3d24
15 changed files with 157 additions and 149 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue