/***************************************************************************
- * 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 *
#include <QDebug>
#include <QAbstractButton>
#include <QFormLayout>
+#include <QIcon>
#include <QSpinBox>
#include "coreconfigwizard.h"
#include "coreconnection.h"
-#include "iconloader.h"
CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList<QVariant> &backends, QWidget *parent)
: QWizard(parent),
setStartId(IntroPage);
//setStartId(StorageSelectionPage);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
setWizardStyle(ModernStyle);
#endif
setModal(true);
setWindowTitle(tr("Core Configuration Wizard"));
- setPixmap(QWizard::LogoPixmap, DesktopIcon("quassel"));
+ setPixmap(QWizard::LogoPixmap, QIcon::fromTheme("quassel", QIcon(":/icons/quassel.png")).pixmap(48));
connect(connection, SIGNAL(coreSetupSuccess()), SLOT(coreSetupSuccess()));
connect(connection, SIGNAL(coreSetupFailed(QString)), SLOT(coreSetupFailed(QString)));
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();
}