#include "clientsyncer.h"
+#include <QNetworkProxy>
+
#include "client.h"
#include "global.h"
#include "identity.h"
emit loginSuccess();
} else if(msg["MsgType"] == "SessionInit") {
sessionStateReceived(msg["SessionState"].toMap());
+ break; // this is definitively the last message we process here!
} else {
emit connectionError(tr("<b>Invalid data received from core!</b><br>Disconnecting."));
disconnectFromCore();
return;
}
- /*
- if (!msg["StartWizard"].toBool()) {
- recvCoreState(msg["Reply"]);
- } else {
- qWarning("Core not configured!");
- qDebug() << "Available storage providers: " << msg["StorageProviders"].toStringList();
- emit showConfigWizard(msg);
- }
- blockSize = 0;
- return;
- }
- */
}
if(blockSize > 0) {
emit recvPartialItem(socket->bytesAvailable(), blockSize);
//emit coreConnectionMsg(tr("Connecting..."));
Q_ASSERT(!socket);
QTcpSocket *sock = new QTcpSocket(Client::instance());
+ 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);
+ }
socket = sock;
connect(sock, SIGNAL(readyRead()), this, SLOT(coreHasData()));
connect(sock, SIGNAL(connected()), this, SLOT(coreSocketConnected()));