mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 03:41:50 +03:00
FolderWizard: Return targetPath properly
This commit is contained in:
parent
7b5ef2186e
commit
47f151c594
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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 <b>not</b> configure another sync directory."));
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue