X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=bac736b0c3c74eda9fb53f46c68d9bfb79d5b632;hp=ca008e907d77f715111f1543e0061b06e730613d;hb=af456476e906a564d9faf3381b8bc3111fdb2bbd;hpb=167ef57a636052f8e18a206e84c3447552e84d2b diff --git a/src/client/client.cpp b/src/client/client.cpp index ca008e90..bac736b0 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -40,6 +40,9 @@ #include "signalproxy.h" #include "util.h" +#include +#include + QPointer Client::instanceptr = 0; AccountId Client::_currentCoreAccount = 0; @@ -277,6 +280,7 @@ void Client::setSyncedToCore() { connect(bufferSyncer(), SIGNAL(lastSeenMsgSet(BufferId, MsgId)), _networkModel, SLOT(setLastSeenMsgId(BufferId, MsgId))); connect(bufferSyncer(), SIGNAL(bufferRemoved(BufferId)), this, SLOT(bufferRemoved(BufferId))); connect(bufferSyncer(), SIGNAL(bufferRenamed(BufferId, QString)), this, SLOT(bufferRenamed(BufferId, QString))); + connect(networkModel(), SIGNAL(setLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &))); signalProxy()->synchronize(bufferSyncer()); // create a new BufferViewManager @@ -406,23 +410,14 @@ void Client::bufferRenamed(BufferId bufferId, const QString &newName) { } void Client::logMessage(QtMsgType type, const char *msg) { - QString prefix; - switch (type) { - case QtDebugMsg: - prefix = "Debug"; - break; - case QtWarningMsg: - prefix = "Warning"; - break; - case QtCriticalMsg: - prefix = "Critical"; - break; - case QtFatalMsg: + fprintf(stderr, "%s\n", msg); + fflush(stderr); + if(type == QtFatalMsg) { Quassel::logFatalMessage(msg); - return; + } else { + QString msgString = QString("%1\n").arg(msg); + instance()->_debugLog << msgString; + emit instance()->logUpdated(msgString); } - QString msgString = QString("%1: %3\n").arg(prefix, msg); - instance()->_debugLog << msgString; - emit instance()->logUpdated(msgString); }