Windows VFS: Enable Windows VFS by default

This commit is contained in:
Hannah von Reth 2020-08-17 15:31:21 +02:00 committed by Kevin Ottens
parent 1aa1ea7bea
commit f1f6257b5d
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2
4 changed files with 18 additions and 22 deletions

View file

@ -471,7 +471,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
&& !folder->supportsVirtualFiles()
&& bestAvailableVfsMode() != Vfs::Off
&& !folder->isVfsOnOffSwitchPending()) {
ac = menu->addAction(tr("Enable virtual file support %1...").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
ac = menu->addAction(tr("Enable virtual file support%1...").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));
connect(ac, &QAction::triggered, this, &AccountSettings::slotEnableVfsCurrentFolder);
}

View file

@ -494,8 +494,7 @@ FolderWizardSelectiveSync::FolderWizardSelectiveSync(const AccountPtr &account)
layout->addWidget(_selectiveSync);
if (Theme::instance()->showVirtualFilesOption() && bestAvailableVfsMode() != Vfs::Off) {
_virtualFilesCheckBox = new QCheckBox(tr("Use virtual files instead of downloading content immediately %1").arg(
bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
_virtualFilesCheckBox = new QCheckBox(tr("Use virtual files instead of downloading content immediately%1").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));
connect(_virtualFilesCheckBox, &QCheckBox::clicked, this, &FolderWizardSelectiveSync::virtualFilesCheckboxClicked);
connect(_virtualFilesCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
_selectiveSync->setEnabled(state == Qt::Unchecked);

View file

@ -57,6 +57,12 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked);
connect(_ui.rSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
connect(_ui.rVirtualFileSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked);
connect(_ui.rVirtualFileSync, &QRadioButton::toggled, this, [this](bool checked) {
if (checked) {
_ui.lSelectiveSyncSizeLabel->clear();
_selectiveSyncBlacklist.clear();
}
});
connect(_ui.bSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
QIcon appIcon = theme->applicationIcon();
@ -76,8 +82,14 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
_ui.confTraillingSizeLabel->hide();
}
_ui.rVirtualFileSync->setText(tr("Use &virtual files instead of downloading content immediately %1").arg(
bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
_ui.rVirtualFileSync->setText(tr("Use &virtual files instead of downloading content immediately").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));
#ifdef Q_OS_WIN
if (bestAvailableVfsMode() == Vfs::WindowsCfApi) {
qobject_cast<QVBoxLayout *>(_ui.wSyncStrategy->layout())->insertItem(0, _ui.lVirtualFileSync);
setRadioChecked(_ui.rVirtualFileSync);
}
#endif
}
void OwncloudAdvancedSetupPage::setupCustomization()
@ -372,9 +384,6 @@ void OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked()
OwncloudWizard::askExperimentalVirtualFilesFeature(this, [this](bool enable) {
if (!enable)
return;
_ui.lSelectiveSyncSizeLabel->setText(QString());
_selectiveSyncBlacklist.clear();
setRadioChecked(_ui.rVirtualFileSync);
});
}

View file

@ -340,20 +340,8 @@ void OwncloudWizard::askExperimentalVirtualFilesFeature(QWidget *receiver, const
switch (bestVfsMode)
{
case Vfs::WindowsCfApi:
msgBox = new QMessageBox(
QMessageBox::Warning,
tr("Enable technical preview feature?"),
tr("When the \"virtual files\" mode is enabled no files will be downloaded initially. "
"Instead a virtual file will be created for each file that exists on the server. "
"When a file is opened its contents will be downloaded automatically. "
"Alternatively, files can be downloaded manually by using their context menu."
"\n\n"
"The virtual files mode is mutually exclusive with selective sync. "
"Currently unselected folders will be translated to online-only folders "
"and your selective sync settings will be reset."), QMessageBox::NoButton, receiver);
acceptButton = msgBox->addButton(tr("Enable virtual files"), QMessageBox::AcceptRole);
msgBox->addButton(tr("Continue to use selective sync"), QMessageBox::RejectRole);
break;
callback(true);
return;
case Vfs::WithSuffix:
msgBox = new QMessageBox(
QMessageBox::Warning,