Merge remote-tracking branch 'origin/2.6'

This commit is contained in:
Hannah von Reth 2020-02-26 12:02:01 +01:00
commit 4dd0e22a3f
4 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,3 @@
Change: Add branding option to disable experimental features
https://github.com/owncloud/client/issues/7755

View File

@ -103,6 +103,9 @@ GeneralSettings::GeneralSettings(QWidget *parent)
_ui->updateChannel->hide();
#endif
}
if (!theme->enableExperimentalFeatures()) {
_ui->experimentalGroupBox->hide();
}
_ui->versionLabel->setText(QStringLiteral("<a href='%1'>%1</a>").arg(MIRALL_VERSION_STRING));
QObject::connect(_ui->versionLabel, &QLabel::linkActivated, this, &GeneralSettings::showAbout);

View File

@ -569,6 +569,11 @@ QString Theme::versionSwitchOutput() const
}
bool Theme::showVirtualFilesOption() const
{
return enableExperimentalFeatures();
}
bool Theme::enableExperimentalFeatures() const
{
return ConfigFile().showExperimentalOptions();
}

View File

@ -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