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 7c0ab5a40b

Change-Id: I481280fc322392b366479c905a6afb79ec7e0382
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Jarek Kobus
2025-03-25 12:00:20 +01:00
parent e63343e88a
commit 97dd597a56

View File

@@ -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();