-#include "iconloader.h"
-
-CoreConfigWizard::CoreConfigWizard(const QList<QVariant> &backends, QWidget *parent) : QWizard(parent) {
- foreach(QVariant v, backends) _backends[v.toMap()["DisplayName"].toString()] = v;
- setPage(IntroPage, new CoreConfigWizardPages::IntroPage(this));
- setPage(AdminUserPage, new CoreConfigWizardPages::AdminUserPage(this));
- setPage(StorageSelectionPage, new CoreConfigWizardPages::StorageSelectionPage(_backends, this));
- syncPage = new CoreConfigWizardPages::SyncPage(this);
- connect(syncPage, SIGNAL(setupCore(const QString &)), this, SLOT(prepareCoreSetup(const QString &)));
- setPage(SyncPage, syncPage);
- syncRelayPage = new CoreConfigWizardPages::SyncRelayPage(this);
- connect(syncRelayPage, SIGNAL(startOver()), this, SLOT(startOver()));
- setPage(SyncRelayPage, syncRelayPage);
- //setPage(Page_StorageDetails, new StorageDetailsPage());
- //setPage(Page_Conclusion, new ConclusionPage(storageProviders));
-
- setStartId(IntroPage);
- //setStartId(StorageSelectionPage);
-
-#ifndef Q_WS_MAC
- setWizardStyle(ModernStyle);
+#include "coreconnection.h"
+
+CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList<QVariant> &backends, QWidget *parent)
+ : QWizard(parent),
+ _connection(connection)
+{
+ setModal(true);
+ setAttribute(Qt::WA_DeleteOnClose);
+
+ foreach(const QVariant &v, backends)
+ _backends[v.toMap()["DisplayName"].toString()] = v;
+
+ setPage(IntroPage, new CoreConfigWizardPages::IntroPage(this));
+ setPage(AdminUserPage, new CoreConfigWizardPages::AdminUserPage(this));
+ setPage(StorageSelectionPage, new CoreConfigWizardPages::StorageSelectionPage(_backends, this));
+ syncPage = new CoreConfigWizardPages::SyncPage(this);
+ connect(syncPage, SIGNAL(setupCore(const QString &, const QVariantMap &)), SLOT(prepareCoreSetup(const QString &, const QVariantMap &)));
+ setPage(SyncPage, syncPage);
+ syncRelayPage = new CoreConfigWizardPages::SyncRelayPage(this);
+ connect(syncRelayPage, SIGNAL(startOver()), this, SLOT(startOver()));
+ setPage(SyncRelayPage, syncRelayPage);
+ //setPage(Page_StorageDetails, new StorageDetailsPage());
+ //setPage(Page_Conclusion, new ConclusionPage(storageProviders));
+
+ setStartId(IntroPage);
+ //setStartId(StorageSelectionPage);
+
+#ifndef Q_OS_MAC
+ setWizardStyle(ModernStyle);