diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-10-04 06:30:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-04 06:30:15 -0400 |
| commit | 2fe50f2ff366ea850eb70a85c6ea7d6c936bf08a (patch) | |
| tree | 77041dd84568817e0e359381e7fb78f6a1f2dd2a /src/selfupdater.cpp | |
| parent | e6a47bf8b70be2c480f77c68c08480a33e71dce3 (diff) | |
| parent | 239cfbe6854f727b5dd3e6922cacc17587361cf5 (diff) | |
Merge pull request #842 from isanae/dialog-settings
Dialog settings
Diffstat (limited to 'src/selfupdater.cpp')
| -rw-r--r-- | src/selfupdater.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index 0ca39b19..8887927a 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -122,8 +122,18 @@ void SelfUpdater::setPluginContainer(PluginContainer *pluginContainer) m_Interface->setPluginContainer(pluginContainer);
}
-void SelfUpdater::testForUpdate()
+void SelfUpdater::testForUpdate(const Settings& settings)
{
+ if (settings.network().offlineMode()) {
+ log::debug("not checking for updates, in offline mode");
+ return;
+ }
+
+ if (!settings.checkForUpdates()) {
+ log::debug("not checking for updates, disabled");
+ return;
+ }
+
// TODO: if prereleases are disabled we could just request the latest release
// directly
try {
|
