X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fclient.cpp;h=7bbbefe7203e8d23940e252caae9d28da9e4147f;hb=165298e0c0ef4666ed9c29f529e35fb4a37913ce;hp=7ab4e272188a1bb464f091206304fe7ffa348f57;hpb=100a2678adf2016b7b4753d09d868929de83294e;p=quassel.git diff --git a/src/client/client.cpp b/src/client/client.cpp index 7ab4e272..7bbbefe7 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -479,6 +479,12 @@ void Client::setDisconnectedFromCore() _ignoreListManager->deleteLater(); _ignoreListManager = 0; } + + if (_transferManager) { + _transferManager->deleteLater(); + _transferManager = 0; + } + // we probably don't want to save pending input for reconnect _userInputBuffer.clear(); @@ -640,6 +646,7 @@ void Client::markBufferAsRead(BufferId id) } +#if QT_VERSION < 0x050000 void Client::logMessage(QtMsgType type, const char *msg) { fprintf(stderr, "%s\n", msg); @@ -659,3 +666,26 @@ void Client::logMessage(QtMsgType type, const char *msg) emit instance()->logUpdated(msgString); } } +#else +void Client::logMessage(QtMsgType type, const QMessageLogContext &context, const QString &msg) +{ + Q_UNUSED(context); + + fprintf(stderr, "%s\n", msg.toLocal8Bit().constData()); + fflush(stderr); + if (type == QtFatalMsg) { + Quassel::logFatalMessage(msg.toLocal8Bit().constData()); + } + else { + QString msgString = QString("%1\n").arg(msg); + + //Check to see if there is an instance around, else we risk recursions + //when calling instance() and creating new ones. + if (!instanceExists()) + return; + + instance()->_debugLog << msgString; + emit instance()->logUpdated(msgString); + } +} +#endif