diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-07-22 16:43:49 +0200 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-08-01 15:42:14 +0200 |
commit | 6467ca84366d897ba4ed25ed74560296070b571d (patch) | |
tree | 16910be69b81ff745069e3b82a96fdf6214d94ce | |
parent | 35046bc0913f7eda19716348eb1284351a4443ff (diff) |
Fix app start/stop in single-process mode
If an app has been started and immediately stopped again, the next
time the app is started the assert would fail, that checks that the
app's root object is null. The stop signal would be handled before
the InProcessWindow could be created and hence the app's window
surface would never be released. The assert is in
QmlInProcessRuntime::start().
Cherry-picked from dev: cada823
Change-Id: I0711416a0fa4582bdaaa0a7f9b0c081eb6539c01
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | src/window-lib/windowmanager.cpp | 2 | ||||
-rw-r--r-- | tests/qml/windowmapping/tst_windowmapping.qml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/window-lib/windowmanager.cpp b/src/window-lib/windowmanager.cpp index 096db273..97a3b68c 100644 --- a/src/window-lib/windowmanager.cpp +++ b/src/window-lib/windowmanager.cpp @@ -491,7 +491,7 @@ void WindowManager::setupInProcessRuntime(AbstractRuntime *runtime) runtime->setInProcessQmlEngine(d->qmlEngine); connect(runtime, &AbstractRuntime::inProcessSurfaceItemReady, - this, &WindowManager::inProcessSurfaceItemCreated, Qt::QueuedConnection); + this, &WindowManager::inProcessSurfaceItemCreated); } } diff --git a/tests/qml/windowmapping/tst_windowmapping.qml b/tests/qml/windowmapping/tst_windowmapping.qml index 5e5d0f45..00a6e582 100644 --- a/tests/qml/windowmapping/tst_windowmapping.qml +++ b/tests/qml/windowmapping/tst_windowmapping.qml @@ -292,6 +292,7 @@ TestCase { function test_window_properties() { var app = ApplicationManager.application("test.winmap.amwin"); + windowPropertyChangedSpy.clear(); app.start(); tryCompare(WindowManager, "count", 1); |