diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-07-01 14:57:45 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-07-01 14:58:02 +0200 |
| commit | d95ba75825d3b417d03cd2cce6bb944d5a679040 (patch) | |
| tree | f401d481a0c96cfac35437373d53d87566c44ea8 /src/qt/bitcoin.cpp | |
| parent | Merge pull request #4325 (diff) | |
| download | discoin-d95ba75825d3b417d03cd2cce6bb944d5a679040.tar.xz discoin-d95ba75825d3b417d03cd2cce6bb944d5a679040.zip | |
qt: Log messages with type>QtDebugMsg as non-debug
More important messages should end up in the log no matter
if -debug=qt is set.
Diffstat (limited to 'src/qt/bitcoin.cpp')
| -rw-r--r-- | src/qt/bitcoin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 89305e9f3..569facb49 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -126,15 +126,15 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans #if QT_VERSION < 0x050000 void DebugMessageHandler(QtMsgType type, const char *msg) { - Q_UNUSED(type); - LogPrint("qt", "GUI: %s\n", msg); + const char *category = (type == QtDebugMsg) ? "qt" : NULL; + LogPrint(category, "GUI: %s\n", msg); } #else void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg) { - Q_UNUSED(type); Q_UNUSED(context); - LogPrint("qt", "GUI: %s\n", qPrintable(msg)); + const char *category = (type == QtDebugMsg) ? "qt" : NULL; + LogPrint(category, "GUI: %s\n", QString::toStdString(msg)); } #endif |