Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <fmueller@owncloud.com>2022-04-11 15:11:57 +0300
committerHannah von Reth <vonreth@kde.org>2022-04-12 15:51:18 +0300
commit44db53318351b061ba2db4c7bf6b30a789b8f8b1 (patch)
treeb127e2041401db645df3027c6bbdc21d62a2ecf8 /src/gui/folderwizard
parent2b73fb95e01d0a4ce47602df24116cf81b4463a9 (diff)
Restore VFS confirmation dialog in new class
The old confirmation dialog was located within the setup wizard, which did not make a lot of sense. Therefore, the old code was restored, but moved into a new dedicated class, which can be used from other places easily, too.
Diffstat (limited to 'src/gui/folderwizard')
-rw-r--r--src/gui/folderwizard/folderwizard.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/folderwizard/folderwizard.cpp b/src/gui/folderwizard/folderwizard.cpp
index 31faa0bb0..f03c7fd41 100644
--- a/src/gui/folderwizard/folderwizard.cpp
+++ b/src/gui/folderwizard/folderwizard.cpp
@@ -21,6 +21,7 @@
#include "common/asserts.h"
#include "configfile.h"
#include "creds/abstractcredentials.h"
+#include "gui/askexperimentalvirtualfilesfeaturemessagebox.h"
#include "networkjobs.h"
#include "theme.h"
@@ -559,10 +560,19 @@ void FolderWizardSelectiveSync::virtualFilesCheckboxClicked()
// The click has already had an effect on the box, so if it's
// checked it was newly activated.
if (_virtualFilesCheckBox->isChecked()) {
- OwncloudWizard::askExperimentalVirtualFilesFeature(this, [this](bool enable) {
- if (!enable)
- _virtualFilesCheckBox->setChecked(false);
+ auto *messageBox = new AskExperimentalVirtualFilesFeatureMessageBox(this);
+
+ connect(messageBox, &AskExperimentalVirtualFilesFeatureMessageBox::rejected, this, [this]() {
+ _virtualFilesCheckBox->setChecked(false);
});
+
+ // no need to show the message box on Windows
+ // as a little shortcut, we just re-use the message box's accept handler
+ if (bestAvailableVfsMode() == Vfs::WindowsCfApi) {
+ Q_EMIT messageBox->accepted();
+ } else {
+ messageBox->show();
+ }
}
}