1
0
Fork 0
forked from lthn/blockchain

gui: fixed a bug with Qt logs in release

This commit is contained in:
sowle 2019-09-29 23:53:03 +03:00
parent f9a72e3300
commit d4a9a0a77d
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -623,7 +623,16 @@ void qt_log_message_handler(QtMsgType type, const QMessageLogContext &context, c
case QtFatalMsg: msg_type = "FATAL "; break;
}
LOG_PRINT("[QT] " << msg_type << local_msg.constData() << " @ " << context.file << ":" << context.line << ", " << (context.function ? context.function : ""), LOG_LEVEL_0);
if (context.file == nullptr && context.function == nullptr)
{
// no debug info
LOG_PRINT("[QT] " << msg_type << local_msg.constData(), LOG_LEVEL_0);
}
else
{
// some debug info
LOG_PRINT("[QT] " << msg_type << local_msg.constData() << " @ " << (context.file ? context.file : "") << ":" << context.line << ", " << (context.function ? context.function : ""), LOG_LEVEL_0);
}
}
bool MainWindow::init_backend(int argc, char* argv[])