From 72670e72cc9a2589045166fc2fe79dc0154f26d7 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sat, 23 Nov 2019 11:40:52 +0100 Subject: [PATCH] QtWebEngine initialize is not required if using AA_ShareOpenGLContexts --- ScreenPlay/app.cpp | 3 --- ScreenPlayWallpaper/main.cpp | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ScreenPlay/app.cpp b/ScreenPlay/app.cpp index 3e5adf1d..c77481a8 100644 --- a/ScreenPlay/app.cpp +++ b/ScreenPlay/app.cpp @@ -20,9 +20,6 @@ App::App() QQuickWindow::setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering); - // Qt < 6.0 needs this init QtWebEngine - QtWebEngine::initialize(); - qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); diff --git a/ScreenPlayWallpaper/main.cpp b/ScreenPlayWallpaper/main.cpp index 59b592d7..3788f747 100644 --- a/ScreenPlayWallpaper/main.cpp +++ b/ScreenPlayWallpaper/main.cpp @@ -21,16 +21,14 @@ int main(int argc, char* argv[]) { - QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QApplication app(argc, argv); + // This gives us nice clickable output in QtCreator qSetMessagePattern("%{if-category}%{category}: %{endif}%{message}\n Loc: [%{file}:%{line}]"); - // Qt < 6.0 needs this init QtWebEngine - QtWebEngine::initialize(); - // If we start with only one argument (app path) // It means we want to test a single wallpaper QStringList argumentList = app.arguments();