X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2Fcoresession.cpp;h=344f6a780dcd4e9d9cc855b890f414d24301615d;hb=f824db0e31b54969e0b7fa0b5405b1e9173d482c;hp=557c9a8321a6a15ea56f2b2228bca70509fb5dd5;hpb=f0ac185f1fc99f64b49928c2886933ec927f265a;p=quassel.git diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 557c9a83..344f6a78 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,7 +51,6 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent) _coreInfo(this), scriptEngine(new QScriptEngine(this)) { - SignalProxy *p = signalProxy(); connect(p, SIGNAL(peerRemoved(QIODevice *)), this, SLOT(removeClient(QIODevice *))); @@ -75,29 +74,18 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent) loadSettings(); initScriptEngine(); - // init BufferSyncer - QHash lastSeenHash = Core::bufferLastSeenMsgIds(user()); - foreach(BufferId id, lastSeenHash.keys()) - _bufferSyncer->requestSetLastSeenMsg(id, lastSeenHash[id]); - connect(&(Core::instance()->syncTimer()), SIGNAL(timeout()), _bufferSyncer, SLOT(storeDirtyIds())); - p->synchronize(_bufferSyncer); + connect(&(Core::instance()->syncTimer()), SIGNAL(timeout()), _bufferViewManager, SLOT(saveBufferViews())); - - // init alias manager + p->synchronize(_bufferSyncer); p->synchronize(&aliasManager()); - - // init BacklogManager p->synchronize(_backlogManager); - - // init IrcListHelper p->synchronize(ircListHelper()); - - // init CoreInfo p->synchronize(&_coreInfo); // Restore session state - if(restoreState) restoreSessionState(); + if(restoreState) + restoreSessionState(); emit initialized(); } @@ -145,12 +133,6 @@ void CoreSession::loadSettings() { foreach(CoreIdentity identity, Core::identities(user())) { createIdentity(identity); } - if(!_identities.count()) { - Identity identity; - identity.setToDefaults(); - identity.setIdentityName(tr("Default Identity")); - createIdentity(identity, QVariantMap()); - } foreach(NetworkInfo info, Core::networks(user())) { createNetwork(info); @@ -159,6 +141,7 @@ void CoreSession::loadSettings() { void CoreSession::saveSessionState() const { _bufferSyncer->storeDirtyIds(); + _bufferViewManager->saveBufferViews(); } void CoreSession::restoreSessionState() {