forked from qt-creator/qt-creator
Android: move finished message from AndroidRunner to AndroidRunnerWorker
Not calling setFinished() when the app is terminated by the
user causes some issue and the app won't be able to restarted
again from the run button and a new deployment is needed. So
move the termination message to the worker where the "died"
message is at.
This amends 33022eec04
.
Change-Id: Ieb02c4343d0f10d988372288715fe7fc2c85a643
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -101,7 +101,6 @@ void AndroidRunner::start()
|
||||
runnerRecipe(glueStorage)
|
||||
};
|
||||
m_taskTreeRunner.start(recipe);
|
||||
m_packageName = AndroidManager::packageName(target);
|
||||
}
|
||||
|
||||
void AndroidRunner::stop()
|
||||
@@ -110,8 +109,6 @@ void AndroidRunner::stop()
|
||||
return;
|
||||
|
||||
emit canceled();
|
||||
appendMessage(Tr::tr("Android target \"%1\" terminated.").arg(m_packageName),
|
||||
Utils::NormalMessageFormat);
|
||||
}
|
||||
|
||||
void AndroidRunner::qmlServerPortReady(Port port)
|
||||
|
@@ -46,7 +46,6 @@ private:
|
||||
Utils::ProcessHandle m_pid;
|
||||
QmlDebug::QmlOutputParser m_outputParser;
|
||||
Tasking::TaskTreeRunner m_taskTreeRunner;
|
||||
QString m_packageName;
|
||||
};
|
||||
|
||||
} // namespace Android::Internal
|
||||
|
@@ -581,10 +581,11 @@ static ExecutableItem postDoneRecipe(const Storage<RunnerStorage> &storage)
|
||||
const auto onDone = [storage] {
|
||||
storage->m_processPID = -1;
|
||||
storage->m_processUser = -1;
|
||||
if (!storage->m_glue->wasCancelled()) {
|
||||
storage->m_glue->setFinished(Tr::tr("Android target \"%1\" died.")
|
||||
.arg(storage->m_packageName));
|
||||
}
|
||||
const QString package = storage->m_packageName;
|
||||
const QString message = storage->m_glue->wasCancelled()
|
||||
? Tr::tr("Android target \"%1\" terminated.").arg(package)
|
||||
: Tr::tr("Android target \"%1\" died.").arg(package);
|
||||
storage->m_glue->setFinished(message);
|
||||
};
|
||||
|
||||
return Group {
|
||||
|
Reference in New Issue
Block a user