}
}
-void Client::setSecuredConnection() {
- emit securedConnection();
-}
-
void Client::disconnectFromCore() {
if(!isConnected())
return;
void showConfigWizard(const QVariantMap &coredata);
void connected();
- void securedConnection();
void disconnected();
void coreConnectionStateChanged(bool);
void createDefaultBufferView();
void createDefaultIdentity();
void createDefaultNetworks();
- void setSecuredConnection();
-
private:
Client(QObject *parent = 0);
#ifdef HAVE_SSL
QSslSocket *sock = new QSslSocket(Client::instance());
+ connect(sock, SIGNAL(encrypted()), this, SIGNAL(encrypted()));
#else
if(conn["useSsl"].toBool()) {
emit connectionError(tr("<b>This client is built without SSL Support!</b><br />Disable the usage of SSL in the account settings."));
- emit encrypted(false);
return;
}
QTcpSocket *sock = new QTcpSocket(Client::instance());
Q_ASSERT(sslSocket);
connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
sslSocket->startClientEncryption();
- emit encrypted(true);
- Client::instance()->setSecuredConnection();
} else {
emit connectionError(tr("<b>The Quassel Core you are trying to connect to does not support SSL!</b><br />If you want to connect anyways, disable the usage of SSL in the account settings."));
- emit encrypted(false);
disconnectFromCore();
return;
}
void coreSetupSuccess();
void coreSetupFailed(const QString &error);
- void encrypted(bool);
+ void encrypted(); // relaying encrypted signal of the encapsulated SslSocket
void startInternalCore(ClientSyncer *syncer);
void connectToInternalCore(SignalProxy *proxy);
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()));
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()));
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();
void initPhaseError(const QString &error);
void initPhaseMsg(const QString &msg);
void initPhaseSocketState(QAbstractSocket::SocketState);
- void encrypted(bool);
/*** Phase Two: Login ***/
void startLogin();
connect(Client::signalProxy(), SIGNAL(lagUpdated(int)), this, SLOT(updateLagIndicator(int)));
// SSL indicator
- connect(Client::instance(), SIGNAL(securedConnection()), this, SLOT(securedConnection()));
sslLabel->setPixmap(QPixmap());
statusBar()->addPermanentWidget(sslLabel);
sslLabel->hide();
if(!Client::internalCore())
statusBar()->showMessage(tr("Connected to core."));
- if(sslLabel->width() == 0)
+ if(Client::signalProxy()->isSecure()) {
+ sslLabel->setPixmap(SmallIcon("security-high"));
+ } else {
sslLabel->setPixmap(SmallIcon("security-low"));
+ }
sslLabel->setVisible(!Client::internalCore());
coreLagLabel->setVisible(!Client::internalCore());
coreLagLabel->setText(text);
}
-
-void MainWin::securedConnection() {
- // todo: make status bar entry
- sslLabel->setPixmap(SmallIcon("security-high"));
-}
-
void MainWin::disconnectedFromCore() {
// save core specific layout and remove bufferviews;
saveLayout();
void connectedToCore();
void setConnectedState();
void updateLagIndicator(int lag = -1);
- void securedConnection();
void disconnectedFromCore();
void setDisconnectedState();
void systrayActivated(QSystemTrayIcon::ActivationReason);