Skip to content

Commit d95ba75

Browse files
committed
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.
1 parent b29b509 commit d95ba75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/qt/bitcoin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
126126
#if QT_VERSION < 0x050000
127127
void DebugMessageHandler(QtMsgType type, const char *msg)
128128
{
129-
Q_UNUSED(type);
130-
LogPrint("qt", "GUI: %s\n", msg);
129+
const char *category = (type == QtDebugMsg) ? "qt" : NULL;
130+
LogPrint(category, "GUI: %s\n", msg);
131131
}
132132
#else
133133
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
134134
{
135-
Q_UNUSED(type);
136135
Q_UNUSED(context);
137-
LogPrint("qt", "GUI: %s\n", qPrintable(msg));
136+
const char *category = (type == QtDebugMsg) ? "qt" : NULL;
137+
LogPrint(category, "GUI: %s\n", QString::toStdString(msg));
138138
}
139139
#endif
140140

0 commit comments

Comments
 (0)