Explicitly provide MOC_DEFINES, use HAVE_SSL instead of QT_NO_OPENSSL. Should fix...
[quassel.git] / src / client / clientsyncer.cpp
index 4ec529c..b65ba56 100644 (file)
@@ -30,6 +30,7 @@
 #include "ircuser.h"
 #include "ircchannel.h"
 #include "network.h"
+#include "networkmodel.h"
 #include "signalproxy.h"
 
 
@@ -123,7 +124,7 @@ void ClientSyncer::connectToCore(const QVariantMap &conn) {
     //emit coreConnectionMsg(tr("Connecting..."));
     Q_ASSERT(!socket);
 
-#ifndef QT_NO_OPENSSL
+#ifdef HAVE_SSL
     QSslSocket *sock = new QSslSocket(Client::instance());
 #else
     if(conn["useSsl"].toBool()) {
@@ -195,7 +196,7 @@ void ClientSyncer::clientInitAck(const QVariantMap &msg) {
   }
   emit connectionMsg(msg["CoreInfo"].toString());
 
-#ifndef QT_NO_OPENSSL
+#ifdef HAVE_SSL
   if(coreConnectionInfo["useSsl"].toBool()) {
     if(msg["SupportSsl"].toBool()) {
       QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
@@ -218,7 +219,7 @@ void ClientSyncer::clientInitAck(const QVariantMap &msg) {
     socket->setProperty("UseCompression", true);
   }
 #endif
-  
+
   if(!msg["Configured"].toBool()) {
     // start wizard
     emit startCoreSetup(msg["StorageBackends"].toList());
@@ -262,8 +263,10 @@ void ClientSyncer::syncToCore(const QVariantMap &sessionState) {
   // create buffers
   // FIXME: get rid of this crap
   QVariantList bufferinfos = sessionState["BufferInfos"].toList();
+  NetworkModel *networkModel = Client::networkModel();
+  Q_ASSERT(networkModel);
   foreach(QVariant vinfo, bufferinfos)
-    Client::buffer(vinfo.value<BufferInfo>());  // create Buffers and BufferItems
+    networkModel->bufferUpdated(vinfo.value<BufferInfo>());  // create BufferItems
 
   QVariantList networkids = sessionState["NetworkIds"].toList();
 
@@ -296,7 +299,7 @@ void ClientSyncer::checkSyncState() {
   }
 }
 
-#ifndef QT_NO_OPENSSL
+#ifdef HAVE_SSL
 void ClientSyncer::sslErrors(const QList<QSslError> &errors) {
   qDebug() << "SSL Errors:";
   foreach(QSslError err, errors)