summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/updatemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/updatemanager.cpp')
-rw-r--r--desktop-widgets/updatemanager.cpp14
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);
}