X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconfigwizard.cpp;h=68735287f559aee837d652d9283bd28151a43818;hp=97fb6d81724b2d28f57c21e19c7de82bb6feaf57;hb=3867471c05de4c463373c6c4d1c414871c14cdc8;hpb=5b686746c880e5cda6d5de3e08180ea4332ff222 diff --git a/src/qtui/coreconfigwizard.cpp b/src/qtui/coreconfigwizard.cpp index 97fb6d81..68735287 100644 --- a/src/qtui/coreconfigwizard.cpp +++ b/src/qtui/coreconfigwizard.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,11 +21,11 @@ #include #include #include +#include #include #include "coreconfigwizard.h" #include "coreconnection.h" -#include "iconloader.h" CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList &backends, QWidget *parent) : QWizard(parent), @@ -52,7 +52,7 @@ CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QListsetEnabled(false); - QVariantMap foo; - foo["AdminUser"] = field("adminUser.user").toString(); - foo["AdminPasswd"] = field("adminUser.password").toString(); - foo["Backend"] = backend; - foo["ConnectionProperties"] = properties; - coreConnection()->doCoreSetup(foo); + coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, properties)); } @@ -206,10 +201,16 @@ StorageSelectionPage::StorageSelectionPage(const QHash &backe registerField("storage.backend", ui.backendList); + int defaultIndex = 0; foreach(QString key, _backends.keys()) { ui.backendList->addItem(_backends[key].toMap()["DisplayName"].toString(), key); + if (_backends[key].toMap()["IsDefault"].toBool()) { + defaultIndex = ui.backendList->count() - 1; + } } + ui.backendList->setCurrentIndex(defaultIndex); + on_backendList_currentIndexChanged(); }