aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/updatemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/updatemanager.cpp')
-rw-r--r--desktop-widgets/updatemanager.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop-widgets/updatemanager.cpp b/desktop-widgets/updatemanager.cpp
index db4cd5ecc..ccf70a67c 100644
--- a/desktop-widgets/updatemanager.cpp
+++ b/desktop-widgets/updatemanager.cpp
@@ -14,17 +14,17 @@ UpdateManager::UpdateManager(QObject *parent) :
QObject(parent),
isAutomaticCheck(false)
{
- auto update_settings = SettingsObjectWrapper::instance()->update_manager_settings;
+ auto update_settings = qPrefUpdateManager::instance();
- if (update_settings->dontCheckForUpdates())
+ if (update_settings->dont_check_for_updates())
return;
- if (update_settings->lastVersionUsed() == subsurface_git_version() &&
- update_settings->nextCheck() > QDate::currentDate())
+ if (update_settings->last_version_used() == subsurface_git_version() &&
+ update_settings->next_check() > QDate::currentDate())
return;
- update_settings->setLastVersionUsed(subsurface_git_version());
- update_settings->setNextCheck(QDate::currentDate().addDays(14));
+ update_settings->set_last_version_used(subsurface_git_version());
+ update_settings->set_next_check(QDate::currentDate().addDays(14));
checkForUpdates(true);
}
@@ -108,8 +108,8 @@ void UpdateManager::requestReceived()
msgbox.exec();
}
if (isAutomaticCheck) {
- auto update_settings = SettingsObjectWrapper::instance()->update_manager_settings;
- if (!update_settings->dontCheckExists()) {
+ auto update_settings = qPrefUpdateManager::instance();
+ if (!update_settings->dont_check_exists()) {
// we allow an opt out of future checks
QMessageBox response(MainWindow::instance());
@@ -121,7 +121,7 @@ void UpdateManager::requestReceived()
response.setWindowTitle(tr("Automatic check for updates"));
response.setIcon(QMessageBox::Question);
response.setWindowModality(Qt::WindowModal);
- update_settings->setDontCheckForUpdates(response.exec() != QMessageBox::Accepted);
+ update_settings->set_dont_check_for_updates(response.exec() != QMessageBox::Accepted);
}
}
}