diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-02-05 16:10:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-12 15:12:14 +0100 |
commit | f14b06e576855530e53e47ef0e29e0130a078b67 (patch) | |
tree | 47ef6340b676539a35d2477cb1f6df169e1156f1 /src | |
parent | 9c198939be1ef064d1a2430a4b9991f2fe16f359 (diff) |
Fix WebEngineContext not being ramped down in tests
aboutToQuit is only emitted if QCoreApplication::exec is run, which
isn't used by Qt's testlib.
Register an application shutdown handler using qAddPostRoutine
instead, which is going to be executed whenever the QCoreApplication
is destroyed.
Change-Id: Iec7d1e528dce79cbe7a73b450b2a0d2df793038a
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/web_engine_context.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 1e28c4ab8..193179ea1 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -94,7 +94,7 @@ scoped_refptr<WebEngineContext> WebEngineContext::currentOrCreate(WebContentsAda if (!sContext) { sContext = new WebEngineContext(renderingMode); // Make sure that we ramp down Chromium before QApplication destroys its X connection, etc. - QObject::connect(qApp, &QCoreApplication::aboutToQuit, destroyContext); + qAddPostRoutine(destroyContext); } else if (renderingMode != sContext->renderingMode()) qFatal("Switching the QtWebEngine rendering mode once initialized in an application is not supported." " If you're using both a QQuickWebView and a QtQuick WebEngineView, make sure that the" |