mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Route qDebug() messages to debug.log
This commit is contained in:
parent
a73aa68b84
commit
47d0534368
@ -151,6 +151,19 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
|
|||||||
QApplication::installTranslator(&translator);
|
QApplication::installTranslator(&translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* qDebug() message handler --> debug.log */
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
void DebugMessageHandler(QtMsgType type, const char * msg)
|
||||||
|
{
|
||||||
|
OutputDebugStringF("%s\n", msg);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
|
||||||
|
{
|
||||||
|
OutputDebugStringF("%s\n", qPrintable(msg));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef BITCOIN_QT_TEST
|
#ifndef BITCOIN_QT_TEST
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -242,6 +255,13 @@ int main(int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Install qDebug() message handler to route to debug.log:
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
qInstallMsgHandler(DebugMessageHandler);
|
||||||
|
#else
|
||||||
|
qInstallMessageHandler(DebugMessageHandler);
|
||||||
|
#endif
|
||||||
|
|
||||||
SplashScreen splash(QPixmap(), 0);
|
SplashScreen splash(QPixmap(), 0);
|
||||||
if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
|
if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user