Android: Be more verbose on installQASIPackage()

Change-Id: I661b94114e912087b1fd8d15db7cd86088a4749e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Jarek Kobus
2024-07-11 12:35:11 +02:00
parent bef8cf703d
commit 2db96fcbca

View File

@@ -606,7 +606,16 @@ void installQASIPackage(Target *target, const FilePath &packagePath)
Process *process = startAdbProcess(arguments, &error);
if (process) {
// TODO: Potential leak when the process is still running on Creator shutdown.
QObject::connect(process, &Process::done, process, &QObject::deleteLater);
QObject::connect(process, &Process::done, target, [process] {
if (process->result() == ProcessResult::FinishedWithSuccess) {
MessageManager::writeSilently(
Tr::tr("Android package installation finished with success."));
} else {
MessageManager::writeDisrupting(Tr::tr("Android package installation failed.")
+ '\n' + process->cleanedStdErr());
}
process->deleteLater();
});
} else {
MessageManager::writeDisrupting(
Tr::tr("Android package installation failed.\n%1").arg(error));