Wizard: remove the check for mutliple folders

It does not make sens now that we have multi account
This commit is contained in:
Olivier Goffart 2015-07-13 14:52:24 +02:00
parent 4dbe0693df
commit e5568b5d13
5 changed files with 0 additions and 32 deletions

View file

@ -79,7 +79,6 @@ void OwncloudSetupWizard::runWizard(QObject* obj, const char* amember, QWidget *
void OwncloudSetupWizard::startWizard()
{
FolderMan *folderMan = FolderMan::instance();
bool multiFolderSetup = folderMan->map().count() > 1;
// ###
AccountPtr account = Account::create();
_ocWizard->setConfigExists(false);
@ -98,14 +97,6 @@ void OwncloudSetupWizard::startWizard()
localFolder = QDir::homePath() + QDir::separator() + localFolder;
}
if (!multiFolderSetup) {
QList<Folder*> folders = folderMan->map().values();
if (!folders.isEmpty()) {
Folder* folder = folders.first();
localFolder = QDir(folder->path()).absolutePath();
}
}
_ocWizard->setProperty("oldLocalFolder", localFolder);
_ocWizard->setProperty("localFolder", localFolder);
@ -123,9 +114,6 @@ void OwncloudSetupWizard::startWizard()
_ocWizard->restart();
// settings re-initialized in initPage must be set here after restart
_ocWizard->setMultipleFoldersExist( multiFolderSetup );
_ocWizard->open();
_ocWizard->raise();
}

View file

@ -39,7 +39,6 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
_checking(false),
_created(false),
_configExists(false),
_multipleFoldersExist(false),
_progressIndi(new QProgressIndicator (this)),
_oldLocalFolder(),
_remoteFolder()
@ -96,7 +95,6 @@ void OwncloudAdvancedSetupPage::initializePage()
WizardCommon::initErrorLabel(_ui.errorLabel);
_checking = false;
_multipleFoldersExist = false;
_oldLocalFolder = wizard()->property("oldLocalFolder").toString();
_ui.lSelectiveSyncSizeLabel->setText(QString());
_ui.lSyncEverythingSizeLabel->setText(QString());
@ -140,12 +138,6 @@ void OwncloudAdvancedSetupPage::updateStatus()
_ui.rSyncEverything->setText(tr("Sync the directory '%1'").arg(_remoteFolder));
}
if ( _multipleFoldersExist ) {
t += tr("<p><small><strong>Warning:</strong> You currently have multiple folders "
"configured. If you continue with the current settings, the folder configurations "
"will be discarded and a single root folder sync will be created!</small></p>");
}
const bool dirNotEmpty(QDir(locFolder).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).count() > 0);
if(dirNotEmpty) {
t += tr("<p><small><strong>Warning:</strong> The local directory is not empty. "
@ -243,11 +235,6 @@ void OwncloudAdvancedSetupPage::setRemoteFolder( const QString& remoteFolder )
}
}
void OwncloudAdvancedSetupPage::setMultipleFoldersExist(bool exist)
{
_multipleFoldersExist = exist;
}
void OwncloudAdvancedSetupPage::slotSelectFolder()
{
QString dir = QFileDialog::getExistingDirectory(0, tr("Local Sync Folder"), QDir::homePath());

View file

@ -69,7 +69,6 @@ private:
bool _checking;
bool _created;
bool _configExists;
bool _multipleFoldersExist;
QProgressIndicator* _progressIndi;
QString _oldLocalFolder;
QString _remoteFolder;

View file

@ -94,11 +94,6 @@ AccountPtr OwncloudWizard::account() const
return _account;
}
void OwncloudWizard::setMultipleFoldersExist(bool exist)
{
_advancedSetupPage->setMultipleFoldersExist(exist);
}
QString OwncloudWizard::localFolder() const
{
return(_advancedSetupPage->localFolder());

View file

@ -59,7 +59,6 @@ public:
void enableFinishOnResultWidget(bool enable);
void displayError( const QString&, bool retryHTTPonly);
void setMultipleFoldersExist( bool );
void setConfigExists( bool );
bool configExists();
AbstractCredentials* getCredentials() const;