Initialise Qt earlier, and whenever available
(to allow it to be used for error boxes)
This commit is contained in:
parent
be1291f689
commit
3e67417bf0
2 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue