aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-05-12 16:19:40 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-05-12 16:19:40 -0400
commit9618f0ebbf4b88045247c01ce8c8f58203508ebf (patch)
tree20c9894691353ee8bab4eec668e9b0b6c6426e0f /SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp
parenta308f430f694423064ebc86fd0506c8c6fdb3d93 (diff)
Imported Upstream version 3.0.6upstream/3.0.6
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp b/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp
index 66620f3..3663a1b 100644
--- a/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp
+++ b/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.cpp
@@ -1,3 +1,5 @@
+#ifdef PORTABLE_CONFIG
+
#include "updatemanager.h"
#include "services/pluginmanager.h"
#include "services/notifymanager.h"
@@ -44,9 +46,9 @@ UpdateManager::~UpdateManager()
cleanup();
}
-void UpdateManager::checkForUpdates()
+void UpdateManager::checkForUpdates(bool force)
{
- getUpdatesMetadata(updatesCheckReply);
+ getUpdatesMetadata(updatesCheckReply, force);
}
void UpdateManager::update()
@@ -150,10 +152,10 @@ void UpdateManager::handleAvailableUpdatesReply(QNetworkReply* reply)
emit noUpdatesAvailable();
}
-void UpdateManager::getUpdatesMetadata(QNetworkReply*& replyStoragePointer)
+void UpdateManager::getUpdatesMetadata(QNetworkReply*& replyStoragePointer, bool force)
{
-#ifndef NO_AUTO_UPDATES
- if (!CFG_CORE.General.CheckUpdatesOnStartup.get() || !isPlatformEligibleForUpdate() || replyStoragePointer)
+#ifdef PORTABLE_CONFIG
+ if ((!CFG_CORE.General.CheckUpdatesOnStartup.get() && !force) || !isPlatformEligibleForUpdate() || replyStoragePointer)
return;
QUrlQuery query;
@@ -1056,3 +1058,5 @@ void UpdateManager::readDownload()
{
currentDownloadFile->write(updatesGetReply->readAll());
}
+
+#endif // PORTABLE_CONFIG