X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.cpp;h=1e21b64cfecf6553573b855e5fe16dd138e9beb9;hp=841ae7c1a31cc77b39f42bd45357cc88d9af5652;hb=06425de049985c2300deec83f3d10bb7a0550c82;hpb=7897b8623a42967511e31c68d5c102033a1dcdb9 diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 841ae7c1..1e21b64c 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -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)));