mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Install message handler after instanciating MainApplication
Fix #514 related to QT bug https://bugreports.qt.io/browse/QTBUG-27024 : "Crash if QGuiApplication::font() is used without instancing QGuiApplication first"
This commit is contained in:
+4
-3
@@ -75,15 +75,16 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext &context, const
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Install message handler
|
||||
qInstallMessageHandler(logMessageHandler);
|
||||
|
||||
set_env_vars_if_needed();
|
||||
|
||||
// Initialize meta-object registry.
|
||||
initRegistry();
|
||||
|
||||
MainApplication app(argc, argv);
|
||||
|
||||
// Install message handler
|
||||
// after QGuiApplication has been instanciated
|
||||
qInstallMessageHandler(logMessageHandler);
|
||||
|
||||
#if USING_QT_5
|
||||
QCommandLineParser parser;
|
||||
|
||||
Reference in New Issue
Block a user