summaryrefslogtreecommitdiff
path: root/src/manager-lib
diff options
context:
space:
mode:
authorBernd Weimer <bernd.weimer@pelagicore.com>2019-08-08 15:13:04 +0200
committerBernd Weimer <bernd.weimer@pelagicore.com>2019-08-08 16:30:28 +0200
commit457ba7b13a8fa21803ea52ec39aaddd7eee5e44a (patch)
treee77a816cc483d13f7498d5e875cea016c7513a63 /src/manager-lib
parente49107e72c12f931a3d2c20c67195fec6513a783 (diff)
downloadqtapplicationmanager-457ba7b13a8fa21803ea52ec39aaddd7eee5e44a.tar.gz
Cleanup application lifecycle in single-process mode
In singel-process mode the ApplicatonObject could still have an associated runtime object, although the runtime had been terminated. This sometimes caused a runtime object to be reused by mistake. Change-Id: Ib4184281a04b7da8f08a848177cf87bace1ce30a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'src/manager-lib')
-rw-r--r--src/manager-lib/qmlinprocessruntime.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/manager-lib/qmlinprocessruntime.cpp b/src/manager-lib/qmlinprocessruntime.cpp
index e45c555b..788e22d2 100644
--- a/src/manager-lib/qmlinprocessruntime.cpp
+++ b/src/manager-lib/qmlinprocessruntime.cpp
@@ -216,6 +216,8 @@ void QmlInProcessRuntime::finish(int exitCode, Am::ExitStatus status)
qCDebug(LogSystem) << "QmlInProcessRuntime (id:" << (m_app ? m_app->id() : qSL("(none)"))
<< ") exited with code:" << exitCode << "status:" << status;
emit finished(exitCode, status);
+ if (m_app)
+ m_app->setCurrentRuntime(nullptr);
setState(Am::NotRunning);
#if !defined(AM_HEADLESS)
if (m_surfaces.isEmpty())