mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Fix:#183 "Display logging output in a console and able to show and hide"
This commit is contained in:
@@ -42,8 +42,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Intercept all logging message and display it in the console
|
||||
void logMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||
{
|
||||
ConsoleWindow::getInstance()->messageLog(type, context, msg);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Install message handler
|
||||
qInstallMessageHandler(logMessageHandler);
|
||||
|
||||
set_env_vars_if_needed();
|
||||
|
||||
MainApplication app(argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user