FolderWizard: Return targetPath properly

This commit is contained in:
Daniel Molkentin 2013-07-22 23:14:41 +02:00
parent 7b5ef2186e
commit 47f151c594
2 changed files with 3 additions and 3 deletions

View file

@ -127,7 +127,7 @@ void AccountSettings::slotFolderWizardAccepted()
QString alias = folderWizard->field(QLatin1String("alias")).toString(); QString alias = folderWizard->field(QLatin1String("alias")).toString();
QString sourceFolder = folderWizard->field(QLatin1String("sourceFolder")).toString(); QString sourceFolder = folderWizard->field(QLatin1String("sourceFolder")).toString();
QString targetPath = folderWizard->field(QLatin1String("OCFolderLineEdit")).toString(); QString targetPath = folderWizard->property("targetPath").toString();
if (!FolderMan::ensureJournalGone( sourceFolder )) if (!FolderMan::ensureJournalGone( sourceFolder ))
return; return;

View file

@ -173,8 +173,6 @@ FolderWizardTargetPage::FolderWizardTargetPage()
_ui.setupUi(this); _ui.setupUi(this);
_ui.warnFrame->hide(); _ui.warnFrame->hide();
// FIXME
registerField(QLatin1String("OCFolderLineEdit"), _ui.folderListWidget);
connect(_ui.addFolderButton, SIGNAL(clicked()), SLOT(slotAddRemoteFolder())); connect(_ui.addFolderButton, SIGNAL(clicked()), SLOT(slotAddRemoteFolder()));
connect(_ui.refreshButton, SIGNAL(clicked()), SLOT(slotRefreshFolders())), connect(_ui.refreshButton, SIGNAL(clicked()), SLOT(slotRefreshFolders())),
connect(_ui.folderListWidget, SIGNAL(currentTextChanged(QString)), connect(_ui.folderListWidget, SIGNAL(currentTextChanged(QString)),
@ -232,6 +230,8 @@ bool FolderWizardTargetPage::isComplete() const
return false; return false;
QString dir = _ui.folderListWidget->currentItem()->text(); QString dir = _ui.folderListWidget->currentItem()->text();
wizard()->setProperty("targetPath", dir);
if( dir == QLatin1String("/") ) { if( dir == QLatin1String("/") ) {
showWarn( tr("If you sync the root folder, you can <b>not</b> configure another sync directory.")); showWarn( tr("If you sync the root folder, you can <b>not</b> configure another sync directory."));
return true; return true;