From 47f151c594605dfa6f8b83f6ef9d6010211618f8 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 22 Jul 2013 23:14:41 +0200 Subject: [PATCH] FolderWizard: Return targetPath properly --- src/mirall/accountsettings.cpp | 2 +- src/mirall/folderwizard.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp index 6dc78f5ae..02ad7901d 100644 --- a/src/mirall/accountsettings.cpp +++ b/src/mirall/accountsettings.cpp @@ -127,7 +127,7 @@ void AccountSettings::slotFolderWizardAccepted() QString alias = folderWizard->field(QLatin1String("alias")).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 )) return; diff --git a/src/mirall/folderwizard.cpp b/src/mirall/folderwizard.cpp index fddf572d3..57eca3940 100644 --- a/src/mirall/folderwizard.cpp +++ b/src/mirall/folderwizard.cpp @@ -173,8 +173,6 @@ FolderWizardTargetPage::FolderWizardTargetPage() _ui.setupUi(this); _ui.warnFrame->hide(); - // FIXME - registerField(QLatin1String("OCFolderLineEdit"), _ui.folderListWidget); connect(_ui.addFolderButton, SIGNAL(clicked()), SLOT(slotAddRemoteFolder())); connect(_ui.refreshButton, SIGNAL(clicked()), SLOT(slotRefreshFolders())), connect(_ui.folderListWidget, SIGNAL(currentTextChanged(QString)), @@ -232,6 +230,8 @@ bool FolderWizardTargetPage::isComplete() const return false; QString dir = _ui.folderListWidget->currentItem()->text(); + wizard()->setProperty("targetPath", dir); + if( dir == QLatin1String("/") ) { showWarn( tr("If you sync the root folder, you can not configure another sync directory.")); return true;