X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconnectdlg.cpp;h=f44ba0f4264164d7e971ce4cb83157bfcf820a6a;hp=5be28e80be22c724756b4e1c3568344e0f353592;hb=236dda81632fa792e788d45b0f4f31b973823f7f;hpb=9a892ffc7a9a2388e6ca42c1ade65c5b42b8503e diff --git a/src/qtui/coreconnectdlg.cpp b/src/qtui/coreconnectdlg.cpp index 5be28e80..f44ba0f4 100644 --- a/src/qtui/coreconnectdlg.cpp +++ b/src/qtui/coreconnectdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,8 +50,9 @@ CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent) setWindowFlags(Qt::Sheet); clientSyncer = new ClientSyncer(this); - connect(this, SIGNAL(newClientSyncer(ClientSyncer *)), Client::instance(), SIGNAL(newClientSyncer(ClientSyncer *))); - emit newClientSyncer(clientSyncer); // announce the new client syncer via the client. + Client::registerClientSyncer(clientSyncer); +// connect(this, SIGNAL(newClientSyncer(ClientSyncer *)), Client::instance(), SIGNAL(newClientSyncer(ClientSyncer *))); +// emit newClientSyncer(clientSyncer); // announce the new client syncer via the client. wizard = 0; @@ -87,7 +88,6 @@ CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent) connect(clientSyncer, SIGNAL(socketStateChanged(QAbstractSocket::SocketState)),this, SLOT(initPhaseSocketState(QAbstractSocket::SocketState))); connect(clientSyncer, SIGNAL(connectionError(const QString &)), this, SLOT(initPhaseError(const QString &))); connect(clientSyncer, SIGNAL(connectionMsg(const QString &)), this, SLOT(initPhaseMsg(const QString &))); - connect(clientSyncer, SIGNAL(encrypted(bool)), this, SLOT(encrypted(bool))); connect(clientSyncer, SIGNAL(startLogin()), this, SLOT(startLogin())); connect(clientSyncer, SIGNAL(loginFailed(const QString &)), this, SLOT(loginFailed(const QString &))); connect(clientSyncer, SIGNAL(loginSuccess()), this, SLOT(startSync())); @@ -95,6 +95,7 @@ CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent) connect(clientSyncer, SIGNAL(sessionProgress(quint32, quint32)), this, SLOT(coreSessionProgress(quint32, quint32))); connect(clientSyncer, SIGNAL(networksProgress(quint32, quint32)), this, SLOT(coreNetworksProgress(quint32, quint32))); connect(clientSyncer, SIGNAL(syncFinished()), this, SLOT(syncFinished())); + connect(clientSyncer, SIGNAL(encrypted()), ui.secureConnection, SLOT(show())); connect(ui.user, SIGNAL(textChanged(const QString &)), this, SLOT(setLoginWidgetStates())); connect(ui.password, SIGNAL(textChanged(const QString &)), this, SLOT(setLoginWidgetStates())); @@ -219,16 +220,8 @@ void CoreConnectDlg::on_accountButtonBox_accepted() { } void CoreConnectDlg::on_useInternalCore_clicked() { - if(!_internalAccountId.isValid()) { - _internalAccountId = findFreeAccountId(); - QVariantMap data; - data["InternalAccount"] = true; - CoreAccountSettings accountSettings; - accountSettings.storeAccountData(_internalAccountId, data); - } - clientSyncer->useInternalCore(_internalAccountId); + clientSyncer->useInternalCore(); ui.loginButtonBox->setStandardButtons(QDialogButtonBox::Cancel); - startSync(); } /***************************************************** @@ -270,13 +263,6 @@ void CoreConnectDlg::initPhaseMsg(const QString &msg) { ui.coreInfoLabel->setText(msg); } -void CoreConnectDlg::encrypted(bool useSsl) { - if(useSsl) - ui.secureConnection->show(); - else - ui.secureConnection->hide(); -} - void CoreConnectDlg::initPhaseSocketState(QAbstractSocket::SocketState state) { QString s; QString host = accountData["Host"].toString();