path: root/src/core/web_engine_context.cpp
diff options
authorJocelyn Turcotte <>2014-02-05 16:10:50 +0100
committerThe Qt Project <>2014-02-12 15:12:14 +0100
commitf14b06e576855530e53e47ef0e29e0130a078b67 (patch)
tree47ef6340b676539a35d2477cb1f6df169e1156f1 /src/core/web_engine_context.cpp
parent9c198939be1ef064d1a2430a4b9991f2fe16f359 (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 <> Reviewed-by: Andras Becsi <>
Diffstat (limited to 'src/core/web_engine_context.cpp')
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"