removing debug output
[quassel.git] / src / core / coresession.cpp
index 841ae7c..9072981 100644 (file)
@@ -80,7 +80,7 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent)
   foreach(BufferId id, lastSeenHash.keys())
     _bufferSyncer->requestSetLastSeenMsg(id, lastSeenHash[id]);
 
-  connect(_bufferSyncer, SIGNAL(lastSeenMsgSet(BufferId, MsgId)), this, SLOT(storeBufferLastSeenMsg(BufferId, MsgId)));
+  connect(&(Core::instance()->syncTimer()), SIGNAL(timeout()), _bufferSyncer, SLOT(storeDirtyIds()));
   p->synchronize(_bufferSyncer);
 
 
@@ -158,6 +158,7 @@ void CoreSession::loadSettings() {
 }
 
 void CoreSession::saveSessionState() const {
+  _bufferSyncer->storeDirtyIds();
 }
 
 void CoreSession::restoreSessionState() {
@@ -263,10 +264,6 @@ QVariant CoreSession::sessionState() {
   return v;
 }
 
-void CoreSession::storeBufferLastSeenMsg(BufferId buffer, const MsgId &msgId) {
-  Core::setBufferLastSeenMsg(user(), buffer, msgId);
-}
-
 void CoreSession::initScriptEngine() {
   signalProxy()->attachSlot(SIGNAL(scriptRequest(QString)), this, SLOT(scriptRequest(QString)));
   signalProxy()->attachSignal(this, SIGNAL(scriptResult(QString)));
@@ -384,7 +381,7 @@ void CoreSession::destroyNetwork(NetworkId id) {
 }
 
 void CoreSession::renameBuffer(const NetworkId &networkId, const QString &newName, const QString &oldName) {
-  BufferInfo bufferInfo = Core::bufferInfo(user(), networkId, BufferInfo::QueryBuffer, oldName);
+  BufferInfo bufferInfo = Core::bufferInfo(user(), networkId, BufferInfo::QueryBuffer, oldName, false);
   _bufferSyncer->renameBuffer(bufferInfo.bufferId(), newName);
 }