From 3e67417bf009493f8f2ae1e362b6014028fc3cbf Mon Sep 17 00:00:00 2001 From: "Rebecca N. Palmer" Date: Tue, 24 Nov 2015 07:21:52 +0000 Subject: [PATCH] Initialise Qt earlier, and whenever available (to allow it to be used for error boxes) --- src/Main/bootstrap.cxx | 6 ++++++ src/Main/main.cxx | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index f15c9098a..5bad23257 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -67,6 +67,9 @@ #include "fg_os.hxx" +#ifdef HAVE_QT + #include +#endif #if defined(HAVE_CRASHRPT) #include @@ -227,6 +230,9 @@ int main ( int argc, char **argv ) // when fg_terminate runs, which causes crashes. osg::Texture::getTextureObjectManager(0); osg::GLBufferObjectManager::getGLBufferObjectManager(0); +#endif +#ifdef HAVE_QT + flightgear::initApp(argc, argv); #endif std::set_terminate(fg_terminate); atexit(fgExitCleanup); diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 2434d2058..e67cb1804 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -449,7 +449,6 @@ int fgMainInit( int argc, char **argv ) showLauncher |= (::getenv("FG_LAUNCHER") != 0); if (showLauncher) { - flightgear::initApp(argc, argv); if (!flightgear::runLauncherDialog()) { return EXIT_SUCCESS; } -- 2.39.5