summaryrefslogtreecommitdiffstats
path: root/basicsuite/shared
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2019-12-04 15:48:20 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2019-12-05 06:04:29 +0000
commitbe1e3a7c2c3c78679603cd03d559309fe764992d (patch)
treeb9b3df32095a1da7c695c875db825f9d7743d1b3 /basicsuite/shared
parent3cebadbdc9a9ca7afeb0ad93f2b3d548ffd4b913 (diff)
Move WebEngine initialization to be earlier
The call must be done before QCoreApplication is created. "QtWebEngine::initialize() called with QCoreApplication object already created and should be call before. This is depreciated and may fail in the future. Change-Id: Ifd979fbb16cc4a891d149f6d7814052069c85401 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'basicsuite/shared')
-rw-r--r--basicsuite/shared/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp
index c6aefc3..f303603 100644
--- a/basicsuite/shared/main.cpp
+++ b/basicsuite/shared/main.cpp
@@ -83,6 +83,13 @@ static bool checkGlAvailability()
int main(int argc, char **argv)
{
+#if defined(USE_QTWEBENGINE)
+ // This is currently needed by all QtWebEngine applications using the HW accelerated QQuickWebView.
+ // It enables sharing the QOpenGLContext of all QQuickWindows of the application.
+ // We have to do so until we expose public API for it in Qt or choose to enable it by default.
+ QtWebEngine::initialize();
+#endif
+
//qputenv("QT_IM_MODULE", QByteArray("qtvkb"));
qputenv("QT_QUICK_CONTROLS_CONF", "/data/user/qt/qtquickcontrols2/qtquickcontrols2.conf");
QIcon::setThemeName("gallery");
@@ -95,13 +102,6 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
-#if defined(USE_QTWEBENGINE)
- // This is currently needed by all QtWebEngine applications using the HW accelerated QQuickWebView.
- // It enables sharing the QOpenGLContext of all QQuickWindows of the application.
- // We have to do so until we expose public API for it in Qt or choose to enable it by default.
- QtWebEngine::initialize();
-#endif
-
QFontDatabase::addApplicationFont(":/fonts/TitilliumWeb-Regular.ttf");
QFontDatabase::addApplicationFont(":/fonts/TitilliumWeb-SemiBold.ttf");
QFontDatabase::addApplicationFont(":/fonts/TitilliumWeb-Bold.ttf");