X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconfigwizard.cpp;h=a4cfe166a28e31445940e6f0da1b1bb546964b0d;hp=ee9dd0dc02c986a3febd06e087e16c822f528050;hb=f77a0b720ed58a2b68876b9320742b81b6df871f;hpb=4b0caf61565c8791efba283bbcaf73530b9feafc diff --git a/src/qtui/coreconfigwizard.cpp b/src/qtui/coreconfigwizard.cpp index ee9dd0dc..a4cfe166 100644 --- a/src/qtui/coreconfigwizard.cpp +++ b/src/qtui/coreconfigwizard.cpp @@ -37,10 +37,10 @@ CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList CoreConfigWizard::backends() const return _backends; } + QHash CoreConfigWizard::authenticators() const { return _authenticators; } + void CoreConfigWizard::prepareCoreSetup(const QString &backend, const QVariantMap &properties, const QString &authenticator, const QVariantMap &authProperties) { // Prevent the user from changing any settings he already specified... @@ -102,10 +104,10 @@ void CoreConfigWizard::prepareCoreSetup(const QString &backend, const QVariantMa // FIXME? We need to be able to set up older cores that don't have auth backend support. // So if the core doesn't support that feature, don't pass those parameters. - if (!(Client::coreFeatures() & Quassel::Authenticators)) - { + if (!(Client::coreFeatures() & Quassel::Authenticators)) { coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, properties)); - } else { + } + else { coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, properties, authenticator, authProperties)); } } @@ -194,10 +196,10 @@ AdminUserPage::AdminUserPage(QWidget *parent) : QWizardPage(parent) int AdminUserPage::nextId() const { // If the core doesn't support auth backends, skip that page! - if (!(Client::coreFeatures() & Quassel::Authenticators)) - { + if (!(Client::coreFeatures() & Quassel::Authenticators)) { return CoreConfigWizard::StorageSelectionPage; - } else { + } + else { return CoreConfigWizard::AuthenticationSelectionPage; } } @@ -276,31 +278,6 @@ QVariantMap AuthenticationSelectionPage::connectionProperties() const properties[key] = def; } } - qDebug() << properties; - -// QVariantMap properties = _backends[backend].toMap()["ConnectionProperties"].toMap(); -// if(!properties.isEmpty() && _connectionBox) { -// QVariantMap::iterator propertyIter = properties.begin(); -// while(propertyIter != properties.constEnd()) { -// QWidget *widget = _connectionBox->findChild(propertyIter.key()); -// switch(propertyIter.value().type()) { -// case QVariant::Int: -// { -// QSpinBox *spinbox = qobject_cast(widget); -// Q_ASSERT(spinbox); -// propertyIter.value() = QVariant(spinbox->value()); -// } -// break; -// default: -// { -// QLineEdit *lineEdit = qobject_cast(widget); -// Q_ASSERT(lineEdit); -// propertyIter.value() = QVariant(lineEdit->text()); -// } -// } -// propertyIter++; -// } -// } return properties; }