diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-05-02 11:15:51 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-05-02 09:57:43 +0000 |
commit | bb494edf4bf3ccfcf7f0276554f45d18cdd3a5cb (patch) | |
tree | 5c2f744b1a7b0cc7e26eb798f49a0e473fa2ac1f /src | |
parent | 8575d9aa489f4c9e839e3cb28b9f8c27acbdb425 (diff) |
Fix QtWebEngineCore::initialize() for Qt < 5.6.1
In Qt versions < 5.6.1 the constructor of QCoreApplication directly
calls QCoreApplication::init and QtWebEngineCore::initialize() in turn.
That means that qobject_cast<QGuiApplication*> cannot work, because the
object is not fully constructed yet.
This was fixed for Qt 5.6.1 in commit qtbase/1b441c39.
This patch turns off the fix for QTBUG-51789 when building QtWebEngine
against Qt versions older than 5.6.1.
Task-number: QTBUG-51789
Change-Id: I092fb559ea4449bd443737d5962b4b87dee88cdd
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/api/qtwebenginecoreglobal.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index e60e6139e..f4edae0e6 100644 --- a/src/core/api/qtwebenginecoreglobal.cpp +++ b/src/core/api/qtwebenginecoreglobal.cpp @@ -76,9 +76,11 @@ QWEBENGINE_PRIVATE_EXPORT void initialize() return; } +#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 1)) // Bail out silently if the user did not construct a QGuiApplication. if (!qobject_cast<QGuiApplication *>(app)) return; +#endif if (app->thread() != QThread::currentThread()) { qFatal("QtWebEngine::initialize() must be called from the Qt gui thread."); |