Android: Fix potential process leak

Make process a child of Target.

Change-Id: If77a54120044829b6551cd0f6446e3edffa28558
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Jarek Kobus
2024-07-11 12:28:23 +02:00
parent 2b620aca7e
commit 77fa73c524

View File

@@ -605,7 +605,7 @@ void installQASIPackage(Target *target, const FilePath &packagePath)
QString error; QString error;
Process *process = startAdbProcess(arguments, &error); Process *process = startAdbProcess(arguments, &error);
if (process) { if (process) {
// TODO: Potential leak when the process is still running on Creator shutdown. process->setParent(target);
QObject::connect(process, &Process::done, target, [process] { QObject::connect(process, &Process::done, target, [process] {
if (process->result() == ProcessResult::FinishedWithSuccess) { if (process->result() == ProcessResult::FinishedWithSuccess) {
MessageManager::writeSilently( MessageManager::writeSilently(