From 8d36cfe69eb151be03407431a0895a2c521cf2fa Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 18 Nov 2019 16:35:29 +0100 Subject: [PATCH] [skip ci] minor changes --- src/Gui/Application.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 2e44438fbd..1843acdc33 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1748,13 +1748,8 @@ void Application::runApplication(void) std::map::const_iterator it; #if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) - QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); -#endif - - // A new QApplication - Base::Console().Log("Init: Creating Gui::Application and QApplication\n"); - -#if defined(QTWEBENGINE) && defined(Q_OS_LINUX) + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); +#elif defined(QTWEBENGINE) && defined(Q_OS_LINUX) // Avoid warning of 'Qt WebEngine seems to be initialized from a plugin...' // QTWEBENGINE is defined in src/Gui/CMakeLists.txt, currently only enabled // when build with Conda. @@ -1773,6 +1768,9 @@ void Application::runApplication(void) QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); #endif + // A new QApplication + Base::Console().Log("Init: Creating Gui::Application and QApplication\n"); + // if application not yet created by the splasher int argc = App::Application::GetARGC(); GUISingleApplication mainApp(argc, App::Application::GetARGV());