]> git.mxchange.org Git - flightgear.git/commitdiff
Initialise Qt earlier, and whenever available
authorRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 24 Nov 2015 07:21:52 +0000 (07:21 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 24 Nov 2015 07:21:52 +0000 (07:21 +0000)
(to allow it to be used for error boxes)

src/Main/bootstrap.cxx
src/Main/main.cxx

index f15c9098ad0efe40c99fe5125dc2a0365a50a194..5bad23257fedacdc1d6728dc45dd02664271fe52 100644 (file)
@@ -67,6 +67,9 @@
 
 #include "fg_os.hxx"
 
+#ifdef HAVE_QT
+        #include <GUI/QtLauncher.hxx>
+#endif
 #if defined(HAVE_CRASHRPT)
        #include <CrashRpt.h>
 
@@ -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);
index 2434d2058adcd3c46d4c18aeea3e09395ef427d1..e67cb1804eef3f9657ec1841900ff2f15b804d68 100644 (file)
@@ -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;
         }