Debugger: Normalize some state handling

Remove some now-unusual connection to RunControl::finished
and use a finished() callback in the ToolRunner implementation
instead.

Change-Id: Ieddf05a2258d9a300ac50a739d77d9cfaee10ca6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-04 08:11:04 +02:00
parent 0e5fdb7fe3
commit fcdc9342b5
5 changed files with 7 additions and 9 deletions

View File

@@ -730,6 +730,7 @@ void RunControlPrivate::initiateStop()
void RunControlPrivate::onToolStopped()
{
toolRunner->onStop();
checkState(State::ToolStopping);
setState(State::TargetStopping);
targetRunner->stop();
@@ -742,6 +743,7 @@ void RunControlPrivate::onTargetStopped()
QTC_CHECK(applicationProcessHandle.isValid());
q->setApplicationProcessHandle(Utils::ProcessHandle());
toolRunner->onFinished();
targetRunner->onFinished();
}
@@ -1356,7 +1358,6 @@ void ToolRunner::reportStopFailed(const QString &msg)
void ToolRunner::reportStopped()
{
onStop();
m_runControl->d->onToolStopped();
}