From: Rebecca N. Palmer Date: Tue, 24 Nov 2015 07:21:52 +0000 (+0000) Subject: Initialise Qt earlier, and whenever available X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3e67417bf009493f8f2ae1e362b6014028fc3cbf;p=flightgear.git Initialise Qt earlier, and whenever available (to allow it to be used for error boxes) --- 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; }