Ensure LauncherInterfacePrivate::doStop() is called on shutdown

LauncherInterface::stopLauncher() ensures now that a posted call to
doStop() is being executed before we delete the laucher's thread.

Change-Id: I80f4136810e113bcaa1427eca7906d710cc770de
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2021-08-25 14:59:00 +02:00
parent acf0ee9fbf
commit 1ac36b08f1

View File

@@ -226,7 +226,7 @@ void LauncherInterface::stopLauncher()
QTC_ASSERT(s_instance != nullptr, return); QTC_ASSERT(s_instance != nullptr, return);
LauncherInterfacePrivate *p = s_instance->m_private; LauncherInterfacePrivate *p = s_instance->m_private;
// Call in launcher's thread. // Call in launcher's thread.
QMetaObject::invokeMethod(p, &LauncherInterfacePrivate::doStop); QMetaObject::invokeMethod(p, &LauncherInterfacePrivate::doStop, Qt::BlockingQueuedConnection);
delete s_instance; delete s_instance;
s_instance = nullptr; s_instance = nullptr;
} }