#include "signalproxy.h"
#include "util.h"
+#include <stdio.h>
+#include <stdlib.h>
+
QPointer<Client> Client::instanceptr = 0;
AccountId Client::_currentCoreAccount = 0;
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
}
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);
}