X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconfigwizard.cpp;h=68735287f559aee837d652d9283bd28151a43818;hp=e1d74feeb448a7a5f81bb4649119c58c8d7c7f1b;hb=3867471c05de4c463373c6c4d1c414871c14cdc8;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada diff --git a/src/qtui/coreconfigwizard.cpp b/src/qtui/coreconfigwizard.cpp index e1d74fee..68735287 100644 --- a/src/qtui/coreconfigwizard.cpp +++ b/src/qtui/coreconfigwizard.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 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), @@ -67,7 +67,7 @@ CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList &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(); }