diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-04-21 04:59:31 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-04-26 18:32:09 +0300 |
commit | d2d3cae83b8956d2b020e440beb17ae6d9af565d (patch) | |
tree | 076d2ec49bcdb509893bef434bf0ea31460f7119 /src/gui/accountsettings.cpp | |
parent | 8f1083da6ee709e59f6c715cc2c0097797e72fd5 (diff) |
Use folder wizard for manual sync config
This approach gives the user a lot more freedom.
The commit further moves the dialog logic out of the folder manager code, which allows us to clean up some API weirdness.
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r-- | src/gui/accountsettings.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 9653b9749..ce41d23b0 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -430,17 +430,18 @@ void AccountSettings::slotFolderWizardAccepted() qCInfo(lcAccountSettings) << "Folder wizard completed"; - const auto syncMode = folderWizard->property("useVirtualFiles").toBool() ? Wizard::SyncMode::UseVfs : Wizard::SyncMode::SyncEverything; + bool useVfs = folderWizard->property("useVirtualFiles").toBool(); + auto folder = folderMan->addFolderFromWizard(_accountState, folderWizard->field(QLatin1String("sourceFolder")).toString(), folderWizard->property("targetPath").toString(), folderWizard->davUrl(), folderWizard->displayName(), - syncMode); + useVfs); const auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList(); - if (!selectiveSyncBlackList.isEmpty() && OC_ENSURE(folder && syncMode == Wizard::SyncMode::SyncEverything)) { + if (!selectiveSyncBlackList.isEmpty() && OC_ENSURE(folder && !useVfs)) { folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, selectiveSyncBlackList); // The user already accepted the selective sync dialog. everything is in the white list |