Added uint networkId() to BufferIds.
[quassel.git] / src / core / coresession.cpp
index 34ae160..bdd2978 100644 (file)
@@ -50,7 +50,6 @@ CoreSession::CoreSession(UserId uid, Storage *_storage, QObject *parent) : QObje
   p->attachSignal(storage, SIGNAL(bufferIdUpdated(BufferId)));
   p->attachSignal(this, SIGNAL(sessionDataChanged(const QString &, const QVariant &)), SIGNAL(coreSessionDataChanged(const QString &, const QVariant &)));
   p->attachSlot(SIGNAL(clientSessionDataChanged(const QString &, const QVariant &)), this, SLOT(storeSessionData(const QString &, const QVariant &)));
-
   /* Autoconnect. (When) do we actually do this?
   QStringList list;
   QVariantMap networks = retrieveSessionData("Networks").toMap();
@@ -164,8 +163,8 @@ void CoreSession::recvMessageFromServer(Message::Type type, QString target, QStr
     buf = storage->getBufferId(user, s->getNetwork(), target);
   }
   Message msg(buf, type, text, sender, flags);
-  msg.msgId = storage->logMessage(msg);
-  Q_ASSERT(msg.msgId);
+  msg.setMsgId(storage->logMessage(msg));
+  Q_ASSERT(msg.msgId());
   emit displayMsg(msg);
 }
 
@@ -190,7 +189,7 @@ QVariant CoreSession::sessionState() {
   v["SessionData"] = sessionData;
   mutex.unlock();
   v["Networks"] = QVariant(servers.keys());
-  // v["Payload"] = QByteArray(100000000, 'a');
+  // v["Payload"] = QByteArray(100000000, 'a');  // for testing purposes
   return v;
 }