forked from qt-creator/qt-creator
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:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user