This config file option will also control other features in the future.
auto *layout = new QVBoxLayout(this);
_selectiveSync = new SelectiveSyncWidget(account, this);
layout->addWidget(_selectiveSync);
- _placeholderCheckBox = new QCheckBox(tr("Create placeholders instead of downloading files (experimental)"));
- connect(_placeholderCheckBox, &QCheckBox::clicked, this, &FolderWizardSelectiveSync::placeholderCheckboxClicked);
- layout->addWidget(_placeholderCheckBox);
+
+ if (ConfigFile().showExperimentalOptions()) {
+ _placeholderCheckBox = new QCheckBox(tr("Create placeholders instead of downloading files (experimental)"));
+ connect(_placeholderCheckBox, &QCheckBox::clicked, this, &FolderWizardSelectiveSync::placeholderCheckboxClicked);
+ layout->addWidget(_placeholderCheckBox);
+ }
}
FolderWizardSelectiveSync::~FolderWizardSelectiveSync() = default;
{
WizardCommon::initErrorLabel(_ui.errorLabel);
+ if (!ConfigFile().showExperimentalOptions()) {
+ // If the layout were wrapped in a widget, the auto-grouping of the
+ // radio buttons no longer works and there are surprising margins.
+ // Just manually hide the button and remove the layout.
+ _ui.rPlaceholderSync->hide();
+ _ui.wSyncStrategy->layout()->removeItem(_ui.lPlaceholderSync);
+ }
+
_checking = false;
_ui.lSelectiveSyncSizeLabel->setText(QString());
_ui.lSyncEverythingSizeLabel->setText(QString());
</spacer>
</item>
<item row="0" column="1" colspan="2">
- <widget class="QWidget" name="widget" native="true">
+ <widget class="QWidget" name="wSyncStrategy" native="true">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <layout class="QHBoxLayout" name="lPlaceholderSync">
<item>
<widget class="QRadioButton" name="rPlaceholderSync">
<property name="sizePolicy">
static const char logDebugC[] = "logDebug";
static const char logExpireC[] = "logExpire";
static const char logFlushC[] = "logFlush";
+static const char showExperimentalOptionsC[] = "showExperimentalOptions";
static const char proxyHostC[] = "Proxy/host";
static const char proxyTypeC[] = "Proxy/type";
settings.setValue(QLatin1String(logFlushC), enabled);
}
+bool ConfigFile::showExperimentalOptions() const
+{
+ QSettings settings(configFile(), QSettings::IniFormat);
+ return settings.value(QLatin1String(showExperimentalOptionsC), false).toBool();
+}
+
QString ConfigFile::certificatePath() const
{
return retrieveData(QString(), QLatin1String(certPath)).toString();
bool logFlush() const;
void setLogFlush(bool enabled);
+ // Whether experimental UI options should be shown
+ bool showExperimentalOptions() const;
+
// proxy settings
void setProxyType(int proxyType,
const QString &host = QString(),