X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientsyncer.cpp;h=e7f68b01ceaa99c494866fe13c44e50ca9d3e36c;hp=2c2a5df537323b27bc744f6d4a4cec15218ab82d;hb=018d1d001bf3c051b55525f523d933a8d694e071;hpb=9a36f8e55bfa485467e093fba669841fdfacda2f diff --git a/src/client/clientsyncer.cpp b/src/client/clientsyncer.cpp index 2c2a5df5..e7f68b01 100644 --- a/src/client/clientsyncer.cpp +++ b/src/client/clientsyncer.cpp @@ -20,7 +20,9 @@ #include "clientsyncer.h" -#include +#ifndef QT_NO_NETWORKPROXY +# include +#endif #include "client.h" #include "global.h" @@ -131,11 +133,12 @@ void ClientSyncer::connectToCore(const QVariantMap &conn) { } QTcpSocket *sock = new QTcpSocket(Client::instance()); #endif - +#ifndef QT_NO_NETWORKPROXY if(conn.contains("useProxy") && conn["useProxy"].toBool()) { QNetworkProxy proxy((QNetworkProxy::ProxyType)conn["proxyType"].toInt(), conn["proxyHost"].toString(), conn["proxyPort"].toUInt(), conn["proxyUser"].toString(), conn["proxyPassword"].toString()); sock->setProxy(proxy); } +#endif socket = sock; connect(sock, SIGNAL(readyRead()), this, SLOT(coreHasData())); connect(sock, SIGNAL(connected()), this, SLOT(coreSocketConnected())); @@ -157,6 +160,12 @@ void ClientSyncer::coreSocketConnected() { clientInit["ClientDate"] = Global::quasselDate; clientInit["ClientBuild"] = Global::quasselBuild; // this is a minimum, since we probably won't update for every commit clientInit["UseSsl"] = coreConnectionInfo["useSsl"]; +#ifndef QT_NO_COMPRESS + clientInit["UseCompression"] = true; +#else + clientInit["UseCompression"] = false; +#endif + SignalProxy::writeDataToDevice(socket, clientInit); } @@ -193,6 +202,7 @@ void ClientSyncer::clientInitAck(const QVariantMap &msg) { connect(sslSocket, SIGNAL(sslErrors(const QList &)), this, SLOT(sslErrors(const QList &))); sslSocket->startClientEncryption(); emit encrypted(true); + Client::instance()->setSecuredConnection(); } else { emit connectionError(tr("The Quassel Core you are trying to connect to does not support SSL!
If you want to connect anyways, disable the usage of SSL in the account settings.")); emit encrypted(false); @@ -202,6 +212,12 @@ void ClientSyncer::clientInitAck(const QVariantMap &msg) { } #endif +#ifndef QT_NO_COMPRESS + if(msg["SupportsCompression"].toBool()) { + socket->setProperty("UseCompression", true); + } +#endif + if(!msg["Configured"].toBool()) { // start wizard emit startCoreSetup(msg["StorageBackends"].toList());