summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SwifTools/AutoUpdater/SparkleAutoUpdater.h2
-rw-r--r--SwifTools/AutoUpdater/SparkleAutoUpdater.mm1
-rw-r--r--Swift/Controllers/SettingConstants.cpp2
-rw-r--r--Swift/Controllers/SettingConstants.h6
-rw-r--r--Swift/QtUI/QtSwift.cpp2
5 files changed, 10 insertions, 3 deletions
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdater.h b/SwifTools/AutoUpdater/SparkleAutoUpdater.h
index 1242128..41a25f0 100644
--- a/SwifTools/AutoUpdater/SparkleAutoUpdater.h
+++ b/SwifTools/AutoUpdater/SparkleAutoUpdater.h
@@ -28,6 +28,6 @@ namespace Swift {
private:
class Private;
- const unique_ptr<Private> d;
+ const std::unique_ptr<Private> d;
};
}
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
index 76de34b..6b27ba7 100644
--- a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
+++ b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
@@ -43,7 +43,6 @@ SparkleAutoUpdater::SparkleAutoUpdater(const std::string& url) : d(new Private()
SparkleAutoUpdater::~SparkleAutoUpdater() {
[d->updater release];
- SWIFT_LOG(warning) << std::endl;
}
void SparkleAutoUpdater::checkForUpdates() {
diff --git a/Swift/Controllers/SettingConstants.cpp b/Swift/Controllers/SettingConstants.cpp
index d9766cf..c3de90f 100644
--- a/Swift/Controllers/SettingConstants.cpp
+++ b/Swift/Controllers/SettingConstants.cpp
@@ -27,4 +27,6 @@ const SettingsProvider::Setting<std::string> SettingConstants::TRELLIS_GRID_SIZE
const SettingsProvider::Setting<std::string> SettingConstants::TRELLIS_GRID_POSITIONS("trellisGridPositions", "");
const SettingsProvider::Setting<bool> SettingConstants::DISCONNECT_ON_CARD_REMOVAL("disconnectOnCardRemoval", true);
const SettingsProvider::Setting<bool> SettingConstants::SINGLE_SIGN_ON("singleSignOn", false);
+const SettingsProvider::Setting<bool> SettingConstants::ENABLE_SOFTWARE_UPDATES("enableSoftwareUpdates", true);
+
}
diff --git a/Swift/Controllers/SettingConstants.h b/Swift/Controllers/SettingConstants.h
index ace481b..95d0527 100644
--- a/Swift/Controllers/SettingConstants.h
+++ b/Swift/Controllers/SettingConstants.h
@@ -102,5 +102,11 @@ namespace Swift {
* log in the user; else not.
*/
static const SettingsProvider::Setting<bool> SINGLE_SIGN_ON;
+ /**
+ * The #ENABLE_SOFTWARE_UPDATES settings specifies, whether Swift
+ * should automatically check for software updates in regular
+ * intervals and install them automatically.
+ */
+ static const SettingsProvider::Setting<bool> ENABLE_SOFTWARE_UPDATES;
};
}
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index d8dfac4..16d8955 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -284,7 +284,7 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(handleAboutToQuit()));
PlatformAutoUpdaterFactory autoUpdaterFactory;
- if (autoUpdaterFactory.isSupported()) {
+ if (autoUpdaterFactory.isSupported() && settingsHierachy_->getSetting(SettingConstants::ENABLE_SOFTWARE_UPDATES)) {
autoUpdater_ = autoUpdaterFactory.createAutoUpdater(SWIFT_APPCAST_URL);
autoUpdater_->checkForUpdates();
autoUpdater_->onSuggestRestartToUserToUpdate.connect(boost::bind(&QtSwift::handleRecommendRestartToInstallUpdate, this));