aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertool.cpp
diff options
context:
space:
mode:
authorJarek Kobus <[email protected]>2025-01-06 13:16:25 +0100
committerJarek Kobus <[email protected]>2025-01-07 15:06:35 +0000
commitb404aa8c061c8af08b450d252eb32bbc6b9dd072 (patch)
tree6f088ab89461649a1b6f03b4c1c272bae987b996 /src/plugins/qmlprofiler/qmlprofilertool.cpp
parentbe2c138dcc09494b18f42936e2a904a56b81e0cf (diff)
QmlProfilerTool: Expose handleStop()
Change-Id: I23cc902881899046580e83bc71810a73ca586c1b Reviewed-by: hjk <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 810d373887f..1588106480c 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -362,23 +362,6 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
}
}
- auto handleStop = [this, runControl] {
- if (!d->m_toolBusy)
- return;
-
- d->m_toolBusy = false;
- updateRunActions();
- disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
-
- // If we're still trying to connect, stop now.
- if (d->m_profilerConnections->isConnecting()) {
- showNonmodalWarning(Tr::tr("The application finished before a connection could be "
- "established. No data was loaded."));
- }
- d->m_profilerConnections->disconnectFromServer();
- };
-
- connect(runWorker, &QmlProfilerRunner::stopped, this, handleStop);
connect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
updateRunActions();
@@ -432,6 +415,23 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppRunning);
}
+void QmlProfilerTool::handleStop()
+{
+ if (!d->m_toolBusy)
+ return;
+
+ d->m_toolBusy = false;
+ updateRunActions();
+ disconnect(d->m_stopAction, &QAction::triggered, nullptr, nullptr);
+
+ // If we're still trying to connect, stop now.
+ if (d->m_profilerConnections->isConnecting()) {
+ showNonmodalWarning(Tr::tr("The application finished before a connection could be "
+ "established. No data was loaded."));
+ }
+ d->m_profilerConnections->disconnectFromServer();
+}
+
void QmlProfilerTool::recordingButtonChanged(bool recording)
{
// clientRecording is our intention for new sessions. That may differ from the state of the