Account Wizard: don't whitelist everything on the first sync if we still want to confirm big folder

Issue: https://github.com/owncloud/client/pull/5340#issuecomment-274564441
This commit is contained in:
Olivier Goffart 2017-01-26 10:14:30 +01:00 committed by Markus Goetz
parent b76a9654cc
commit 65e4afedc4
5 changed files with 15 additions and 2 deletions

View file

@ -533,9 +533,11 @@ void OwncloudSetupWizard::slotAssistantFinished( int result )
if (f) {
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
_ocWizard->selectiveSyncBlacklist());
// The user already accepted the selective sync dialog. everything is in the white list
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList,
if (!_ocWizard->isConfirmBigFolderChecked()) {
// The user already accepted the selective sync dialog. everything is in the white list
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList,
QStringList() << QLatin1String("/"));
}
}
_ocWizard->appendToConfigurationLog(tr("<font color=\"green\"><b>Local sync folder %1 successfully created!</b></font>").arg(localFolder));
}

View file

@ -215,6 +215,11 @@ QStringList OwncloudAdvancedSetupPage::selectiveSyncBlacklist() const
return _selectiveSyncBlacklist;
}
bool OwncloudAdvancedSetupPage::isConfirmBigFolderChecked() const
{
return _ui.rSyncEverything->isChecked() && _ui.confCheckBoxSize->isChecked();
}
bool OwncloudAdvancedSetupPage::validatePage()
{
if(!_created) {

View file

@ -41,6 +41,7 @@ public:
bool validatePage() Q_DECL_OVERRIDE;
QString localFolder() const;
QStringList selectiveSyncBlacklist() const;
bool isConfirmBigFolderChecked() const;
void setRemoteFolder( const QString& remoteFolder);
void setMultipleFoldersExist( bool exist );
void directoriesCreated();

View file

@ -108,6 +108,10 @@ QStringList OwncloudWizard::selectiveSyncBlacklist() const
return _advancedSetupPage->selectiveSyncBlacklist();
}
bool OwncloudWizard::isConfirmBigFolderChecked() const
{
return _advancedSetupPage->isConfirmBigFolderChecked();
}
QString OwncloudWizard::ocUrl() const
{

View file

@ -59,6 +59,7 @@ public:
QString ocUrl() const;
QString localFolder() const;
QStringList selectiveSyncBlacklist() const;
bool isConfirmBigFolderChecked() const;
void enableFinishOnResultWidget(bool enable);