forked from qt-creator/qt-creator
QmlProfiler: Also handle RunControl::finished() signal
If you force-stop an application by closing the output tab, we don't get a stopped() signal. In order to properly reset the UI we need to handle the finished() signal then. Change-Id: Ibab5faf86542a59c3eb3aa139bb3dc66afe89ce2 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -373,10 +373,16 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(runControl, &RunControl::stopped, this, [this, runControl] {
|
auto handleStop = [this, runControl]() {
|
||||||
d->m_toolBusy = false;
|
d->m_toolBusy = false;
|
||||||
updateRunActions();
|
updateRunActions();
|
||||||
disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
|
disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
|
||||||
|
};
|
||||||
|
|
||||||
|
connect(runControl, &RunControl::stopped, this, handleStop);
|
||||||
|
connect(runControl, &RunControl::finished, this, [this, runControl, handleStop] {
|
||||||
|
if (d->m_toolBusy)
|
||||||
|
handleStop();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
|
connect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
|
||||||
|
Reference in New Issue
Block a user