diff options
author | jan Iversen <jani@apache.org> | 2018-08-15 11:56:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-15 16:11:39 -0700 |
commit | 0f68e0cc2e6e9c4d4e07b065888b9982086748e7 (patch) | |
tree | f1fc7bb8778bbac553f79a142099cace64f72aef /desktop-widgets/updatemanager.cpp | |
parent | c6998ee92680f2724c2a6adbb4c7a06c9bae0633 (diff) | |
download | subsurface-0f68e0cc2e6e9c4d4e07b065888b9982086748e7.tar.gz |
desktop-widget: remove SettingsObjectWrapper and update qPref calls
remove use of SettingsObjectWrapper::
remove include of SettingsObjectWrapper.h
use qPrefFoo:: for setters and getters
replace prefs.foo with qPrefXYZ::foo() where feasible
(this expands to the same code, but gives us more control
over the variable).
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/updatemanager.cpp')
-rw-r--r-- | desktop-widgets/updatemanager.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/desktop-widgets/updatemanager.cpp b/desktop-widgets/updatemanager.cpp index ccf70a67c..ee209474c 100644 --- a/desktop-widgets/updatemanager.cpp +++ b/desktop-widgets/updatemanager.cpp @@ -8,23 +8,21 @@ #include "core/version.h" #include "desktop-widgets/mainwindow.h" #include "core/cloudstorage.h" -#include "core/subsurface-qt/SettingsObjectWrapper.h" +#include "core/settings/qPrefUpdateManager.h" UpdateManager::UpdateManager(QObject *parent) : QObject(parent), isAutomaticCheck(false) { - auto update_settings = qPrefUpdateManager::instance(); - - if (update_settings->dont_check_for_updates()) + if (qPrefUpdateManager::dont_check_for_updates()) return; - if (update_settings->last_version_used() == subsurface_git_version() && - update_settings->next_check() > QDate::currentDate()) + if (qPrefUpdateManager::last_version_used() == subsurface_git_version() && + qPrefUpdateManager::next_check() > QDate::currentDate()) return; - update_settings->set_last_version_used(subsurface_git_version()); - update_settings->set_next_check(QDate::currentDate().addDays(14)); + qPrefUpdateManager::set_last_version_used(subsurface_git_version()); + qPrefUpdateManager::set_next_check(QDate::currentDate().addDays(14)); checkForUpdates(true); } |