summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/pref.h1
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp7
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.h1
-rw-r--r--desktop-widgets/updatemanager.cpp2
4 files changed, 10 insertions, 1 deletions
diff --git a/core/pref.h b/core/pref.h
index c6c30878d..1e9002563 100644
--- a/core/pref.h
+++ b/core/pref.h
@@ -45,6 +45,7 @@ enum deco_mode {
typedef struct {
bool dont_check_for_updates;
+ bool dont_check_exists;
char *last_version_used;
char *next_check;
} update_manager_prefs_t;
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index 16e7ab7f9..e71e1b1e8 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -78,6 +78,11 @@ bool UpdateManagerSettings::dontCheckForUpdates() const
return prefs.update_manager.dont_check_for_updates;
}
+bool UpdateManagerSettings::dontCheckExists() const
+{
+ return prefs.update_manager.dont_check_exists;
+}
+
QString UpdateManagerSettings::lastVersionUsed() const
{
return prefs.update_manager.last_version_used;
@@ -94,6 +99,7 @@ void UpdateManagerSettings::setDontCheckForUpdates(bool value)
s.beginGroup(group);
s.setValue("DontCheckForUpdates", value);
prefs.update_manager.dont_check_for_updates = value;
+ prefs.update_manager.dont_check_exists = true;
emit dontCheckForUpdatesChanged(value);
}
@@ -1934,6 +1940,7 @@ void SettingsObjectWrapper::load()
s.endGroup();
s.beginGroup("UpdateManager");
+ prefs.update_manager.dont_check_exists = s.contains("DontCheckForUpdates");
prefs.update_manager.dont_check_for_updates = s.value("DontCheckForUpdates").toBool();
prefs.update_manager.last_version_used = copy_string(qPrintable(s.value("LastVersionUsed").toString()));
prefs.update_manager.next_check = copy_string(qPrintable(s.value("NextCheck").toString()));
diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h
index 2f9bffd67..129fd2325 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.h
+++ b/core/subsurface-qt/SettingsObjectWrapper.h
@@ -47,6 +47,7 @@ class UpdateManagerSettings : public QObject {
public:
UpdateManagerSettings(QObject *parent);
bool dontCheckForUpdates() const;
+ bool dontCheckExists() const;
QString lastVersionUsed() const;
QDate nextCheck() const;
diff --git a/desktop-widgets/updatemanager.cpp b/desktop-widgets/updatemanager.cpp
index b56580113..603ba1b01 100644
--- a/desktop-widgets/updatemanager.cpp
+++ b/desktop-widgets/updatemanager.cpp
@@ -110,7 +110,7 @@ void UpdateManager::requestReceived()
}
if (isAutomaticCheck) {
auto update_settings = SettingsObjectWrapper::instance()->update_manager_settings;
- if (!update_settings->dontCheckForUpdates()) {
+ if (!update_settings->dontCheckExists()) {
// we allow an opt out of future checks
QMessageBox response(MainWindow::instance());