mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Make sure all cases are handled
This commit is contained in:
parent
9b0788bdf8
commit
9176afe263
2 changed files with 9 additions and 3 deletions
|
@ -96,6 +96,7 @@ public:
|
|||
WithSuffix,
|
||||
WindowsCfApi,
|
||||
};
|
||||
Q_ENUM(Mode)
|
||||
static QString modeToString(Mode mode);
|
||||
static Optional<Mode> modeFromString(const QString &str);
|
||||
|
||||
|
|
|
@ -334,7 +334,9 @@ void OwncloudWizard::askExperimentalVirtualFilesFeature(QWidget *receiver, const
|
|||
{
|
||||
const auto bestVfsMode = bestAvailableVfsMode();
|
||||
QMessageBox *msgBox = nullptr;
|
||||
if (bestVfsMode == Vfs::WindowsCfApi) {
|
||||
switch (bestVfsMode)
|
||||
{
|
||||
case Vfs::WindowsCfApi:
|
||||
msgBox = new QMessageBox(
|
||||
QMessageBox::Warning,
|
||||
tr("Enable technical preview feature?"),
|
||||
|
@ -348,8 +350,8 @@ void OwncloudWizard::askExperimentalVirtualFilesFeature(QWidget *receiver, const
|
|||
"and your selective sync settings will be reset."), QMessageBox::NoButton, receiver);
|
||||
msgBox->addButton(tr("Enable virtual files"), QMessageBox::AcceptRole);
|
||||
msgBox->addButton(tr("Continue to use selective sync"), QMessageBox::RejectRole);
|
||||
} else {
|
||||
ASSERT(bestVfsMode == Vfs::WithSuffix)
|
||||
break;
|
||||
case Vfs::WithSuffix:
|
||||
msgBox = new QMessageBox(
|
||||
QMessageBox::Warning,
|
||||
tr("Enable experimental feature?"),
|
||||
|
@ -368,6 +370,9 @@ void OwncloudWizard::askExperimentalVirtualFilesFeature(QWidget *receiver, const
|
|||
.arg(APPLICATION_DOTVIRTUALFILE_SUFFIX), QMessageBox::NoButton, receiver);
|
||||
msgBox->addButton(tr("Enable experimental placeholder mode"), QMessageBox::AcceptRole);
|
||||
msgBox->addButton(tr("Stay safe"), QMessageBox::RejectRole);
|
||||
break;
|
||||
case Vfs::Off:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
connect(msgBox, &QMessageBox::finished, receiver, [callback, msgBox](int result) {
|
||||
callback(result == QMessageBox::AcceptRole);
|
||||
|
|
Loading…
Reference in a new issue