forked from lthn/blockchain
gui: fixed a bug with Qt logs in release
This commit is contained in:
parent
f9a72e3300
commit
d4a9a0a77d
1 changed files with 10 additions and 1 deletions
|
|
@ -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[])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue