diff --git a/changelog/2.6.2_2020-02-21/7755 b/changelog/2.6.2_2020-02-21/7755 new file mode 100644 index 0000000000..269210e27f --- /dev/null +++ b/changelog/2.6.2_2020-02-21/7755 @@ -0,0 +1,3 @@ +Change: Add branding option to disable experimental features + +https://github.com/owncloud/client/issues/7755 diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 765a4740ab..513ba50878 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -103,6 +103,9 @@ GeneralSettings::GeneralSettings(QWidget *parent) _ui->updateChannel->hide(); #endif } + if (!theme->enableExperimentalFeatures()) { + _ui->experimentalGroupBox->hide(); + } _ui->versionLabel->setText(QStringLiteral("%1").arg(MIRALL_VERSION_STRING)); QObject::connect(_ui->versionLabel, &QLabel::linkActivated, this, &GeneralSettings::showAbout); diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 05f2c9152f..567dd5b644 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -569,6 +569,11 @@ QString Theme::versionSwitchOutput() const } bool Theme::showVirtualFilesOption() const +{ + return enableExperimentalFeatures(); +} + +bool Theme::enableExperimentalFeatures() const { return ConfigFile().showExperimentalOptions(); } diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 05886c116d..06296a1a4f 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -357,14 +357,20 @@ public: */ virtual QString versionSwitchOutput() const; - /** * @brief Whether to show the option to create folders using "virtual files". * + * By default, this is the same as enableExperimentalFreatures() + */ + virtual bool showVirtualFilesOption() const; + + /** + * @brief Whether to show options considered as experimental. + * * By default, the options are not shown unless experimental options are * manually enabled in the configuration file. */ - virtual bool showVirtualFilesOption() const; + virtual bool enableExperimentalFeatures() const; protected: #ifndef TOKEN_AUTH_ONLY