Put FolderWizard on the stack

This commit is contained in:
Daniel Molkentin 2013-06-11 18:19:09 +02:00
parent 3eb7acde25
commit 1ec5a1aaa2
2 changed files with 6 additions and 11 deletions

View file

@ -134,8 +134,6 @@ Application::Application(int &argc, char **argv) :
setQuitOnLastWindowClosed(false);
_folderWizard = new FolderWizard;
_owncloudSetupWizard = new OwncloudSetupWizard( _folderMan, _theme, this );
connect( _owncloudSetupWizard, SIGNAL(ownCloudWizardDone(int)),
this, SLOT(slotownCloudWizardDone(int)));
@ -687,17 +685,16 @@ void Application::slotAddFolder()
{
// disables sync queuing while in scope
FolderMan::SyncDisabler disableSync(_folderMan);
FolderWizard folderWizard;
Folder::Map folderMap = _folderMan->map();
_folderWizard->setFolderMap( &folderMap );
_folderWizard->restart();
folderWizard.setFolderMap( &folderMap );
if (_folderWizard->exec() == QDialog::Accepted) {
if (folderWizard.exec() == QDialog::Accepted) {
qDebug() << "* Folder wizard completed";
QString alias = _folderWizard->field(QLatin1String("alias")).toString();
QString sourceFolder = _folderWizard->field(QLatin1String("sourceFolder")).toString();
QString targetPath = _folderWizard->field(QLatin1String("OCFolderLineEdit")).toString();
QString alias = folderWizard.field(QLatin1String("alias")).toString();
QString sourceFolder = QDir::fromNativeSeparators(folderWizard.field(QLatin1String("sourceFolder")).toString());
QString targetPath = folderWizard.field(QLatin1String("OCFolderLineEdit")).toString();
QString backend = QLatin1String("owncloud");
if (!FolderMan::ensureJournalGone( sourceFolder ))

View file

@ -38,7 +38,6 @@ class QNetworkReply;
namespace Mirall {
class Theme;
class FolderWatcher;
class FolderWizard;
class StatusDialog;
class OwncloudSetupWizard;
class ownCloudInfo;
@ -123,7 +122,6 @@ private:
QNetworkConfigurationManager *_networkMgr;
#endif
FolderWizard *_folderWizard;
OwncloudSetupWizard *_owncloudSetupWizard;
SslErrorDialog *_sslErrorDialog;