X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientauthhandler.cpp;h=2c96a1c9a81ad6da85f9e828644db75d6141b61f;hp=fc793097b9f08f2df82ed5009213a0a8e5e08166;hb=9ddb5712b16b3219338871d346765bc649007de0;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c diff --git a/src/client/clientauthhandler.cpp b/src/client/clientauthhandler.cpp index fc793097..2c96a1c9 100644 --- a/src/client/clientauthhandler.cpp +++ b/src/client/clientauthhandler.cpp @@ -75,10 +75,21 @@ void ClientAuthHandler::connectToCore() QTcpSocket *socket = new QTcpSocket(this); #endif -// TODO: Handle system proxy #ifndef QT_NO_NETWORKPROXY - if (_account.useProxy()) { - QNetworkProxy proxy(_account.proxyType(), _account.proxyHostName(), _account.proxyPort(), _account.proxyUser(), _account.proxyPassword()); + QNetworkProxy proxy; + proxy.setType(_account.proxyType()); + if (_account.proxyType() == QNetworkProxy::Socks5Proxy || + _account.proxyType() == QNetworkProxy::HttpProxy) { + proxy.setHostName(_account.proxyHostName()); + proxy.setPort(_account.proxyPort()); + proxy.setUser(_account.proxyUser()); + proxy.setPassword(_account.proxyPassword()); + } + + if (_account.proxyType() == QNetworkProxy::DefaultProxy) { + QNetworkProxyFactory::setUseSystemConfiguration(true); + } else { + QNetworkProxyFactory::setUseSystemConfiguration(false); socket->setProxy(proxy); } #endif @@ -288,7 +299,7 @@ void ClientAuthHandler::startRegistration() useSsl = _account.useSsl(); #endif - _peer->dispatch(RegisterClient(Quassel::buildInfo().fancyVersionString, Quassel::buildInfo().buildDate, useSsl)); + _peer->dispatch(RegisterClient(Quassel::buildInfo().fancyVersionString, Quassel::buildInfo().commitDate, useSsl, Quassel::features())); } @@ -303,8 +314,10 @@ void ClientAuthHandler::handle(const ClientRegistered &msg) { _coreConfigured = msg.coreConfigured; _backendInfo = msg.backendInfo; + _authenticatorInfo = msg.authenticatorInfo; - Client::setCoreFeatures(static_cast(msg.coreFeatures)); + Client::setCoreFeatures(Quassel::Features(msg.coreFeatures)); + SignalProxy::current()->sourcePeer()->setFeatures(Quassel::Features(msg.coreFeatures)); // The legacy protocol enables SSL at this point if(_legacy && _account.useSsl()) @@ -321,7 +334,7 @@ void ClientAuthHandler::onConnectionReady() if (!_coreConfigured) { // start wizard - emit startCoreSetup(_backendInfo); + emit startCoreSetup(_backendInfo, _authenticatorInfo); } else // TODO: check if we need LoginEnabled login(); @@ -487,7 +500,7 @@ void ClientAuthHandler::onSslErrors() default: qWarning() << "Certificate digest version" << QString(knownDigestVersion) << "is not supported"; } - + if (knownDigest != calculatedDigest) { bool accepted = false; bool permanently = false;