diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-06-04 09:23:45 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-06-04 09:23:45 +0300 |
commit | 94c09aab1dac228a9ddf03abd7d76559b5d6af16 (patch) | |
tree | 9a02c6407dded2f74b6790f8686c4ab7c8777b21 /src/webenginequick/api/qtwebenginequickglobal.cpp | |
parent | f08b503f680e8a6d4021d2fd21d2386f8e60da24 (diff) | |
parent | 0efae85f199a61fd6919703cfbb74d680d9a9443 (diff) |
Merge tag 'v6.5.6-lts' into 6.5.66.5.6
Qt 6.5.6-lts release
Conflicts solved:
dependencies.yaml
Change-Id: I31ed402989d58b5195459a8a3bf309e6354c35f6
Diffstat (limited to 'src/webenginequick/api/qtwebenginequickglobal.cpp')
-rw-r--r-- | src/webenginequick/api/qtwebenginequickglobal.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/webenginequick/api/qtwebenginequickglobal.cpp b/src/webenginequick/api/qtwebenginequickglobal.cpp index f8f520a05..e24ef643b 100644 --- a/src/webenginequick/api/qtwebenginequickglobal.cpp +++ b/src/webenginequick/api/qtwebenginequickglobal.cpp @@ -37,16 +37,19 @@ namespace QtWebEngineQuick { */ void initialize() { + auto api = QQuickWindow::graphicsApi(); if (!QCoreApplication::startingUp()) { - qWarning("QtWebEngineQuick::initialize() called with QCoreApplication object already created and should be call before. "\ - "This is depreciated and may fail in the future."); + if (api == QSGRendererInterface::OpenGL || (api != QSGRendererInterface::Vulkan + && api != QSGRendererInterface::Metal && api != QSGRendererInterface::Direct3D11)) { + qWarning("QtWebEngineQuick::initialize() called with QCoreApplication object already created and should be call before. "\ + "This is depreciated and may fail in the future."); + } QtWebEngineCore::initialize(); return; } // call initialize the same way as widgets do qAddPreRoutine(QtWebEngineCore::initialize); - auto api = QQuickWindow::graphicsApi(); if (api != QSGRendererInterface::OpenGL && api != QSGRendererInterface::Vulkan && api != QSGRendererInterface::Metal && api != QSGRendererInterface::Direct3D11) QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); |