From 97dd597a56cdd1bab3fe4f604dc1902ccccca8fb Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 25 Mar 2025 12:00:20 +0100 Subject: [PATCH] PerfProfiler: Fix stopping with red square button The circular stop dependency causes that when one worker stopped spontanously, the other will be stopped, too. However, the red square button calls RunControl::initiateStop(), and in this case RunControlPrivate::continueStopOrFinish() can't stop any of them since canStop() sees dependent worker running. The fix is to drop the recorder -> parser stop dependency, connect to recorder's stopped() signal, and call RunControl::initiateStop() explicitly. Amends 7c0ab5a40b09543d97395f300bf50ad27d153b61 Change-Id: I481280fc322392b366479c905a6afb79ec7e0382 Reviewed-by: hjk Reviewed-by: Ulf Hermann --- src/plugins/perfprofiler/perfprofilerruncontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index 586d4472bdb..f5ddc5b39bc 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -139,7 +139,7 @@ public: perfParserWorker->addStartDependency(perfRecordWorker); perfParserWorker->addStopDependency(perfRecordWorker); - perfRecordWorker->addStopDependency(perfParserWorker); + QObject::connect(perfRecordWorker, &RunWorker::stopped, runControl, &RunControl::initiateStop); PerfProfilerTool::instance()->onWorkerCreation(runControl); auto tool = PerfProfilerTool::instance();