From 92bba873587e0cfaf53aff6749d4537b13e275e8 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sat, 24 Mar 2018 17:40:39 +0000 Subject: Add option for enabling future features Test-Information: None Change-Id: I548a18ff47c45eafda31584858607e5705386911 diff --git a/Swift/Controllers/SettingConstants.cpp b/Swift/Controllers/SettingConstants.cpp index 5347d4e..1191c28 100644 --- a/Swift/Controllers/SettingConstants.cpp +++ b/Swift/Controllers/SettingConstants.cpp @@ -25,5 +25,6 @@ const SettingsProvider::Setting SettingConstants::INVITE_AUTO_ACCEP const SettingsProvider::Setting SettingConstants::DISCONNECT_ON_CARD_REMOVAL("disconnectOnCardRemoval", true); const SettingsProvider::Setting SettingConstants::SINGLE_SIGN_ON("singleSignOn", false); const SettingsProvider::Setting SettingConstants::MUC_MARKING_ELISION("mucMarkingElision", true); +const SettingsProvider::Setting SettingConstants::FUTURE("future", false); } diff --git a/Swift/Controllers/SettingConstants.h b/Swift/Controllers/SettingConstants.h index 61781e0..f82dfb5 100644 --- a/Swift/Controllers/SettingConstants.h +++ b/Swift/Controllers/SettingConstants.h @@ -104,5 +104,11 @@ namespace Swift { * have their markings stripped. */ static const SettingsProvider::Setting MUC_MARKING_ELISION; + + /** + * The #FUTURE setting enables use of experimental features + * planned for future releases. + */ + static const SettingsProvider::Setting FUTURE; }; } diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 28793fa..76e3583 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -101,6 +101,8 @@ po::options_description QtSwift::getOptionsDescription() { ("language", po::value(), "Use a specific language, instead of the system-wide one") #endif ("logfile", po::value()->implicit_value(""), "Save all logging information to a file") + ("enable-future", "Enable future features (unsupported). This will persist across restarts") + ("disable-future", "Disable future features. This will persist across restarts") ; return result; } @@ -185,6 +187,14 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa Log::setLogLevel(Swift::Log::debug); } + if (options.count("enable-future")) { + settingsHierachy_->storeSetting(SettingConstants::FUTURE, true); + } + + if (options.count("disable-future")) { + settingsHierachy_->storeSetting(SettingConstants::FUTURE, false); + } + if (options.count("logfile")) { try { std::string fileName = options["logfile"].as(); -- cgit v0.10.2-6-g49f6