From e400195ac0c48b05278eefb5c80457c9def2985d Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 20 Nov 2024 19:20:15 +0100 Subject: [PATCH] AppMan: Inline AppManagerPerfProfilerSupport Task-number: QTCREATORBUG-29168 Change-Id: I856ee7d514588c524ccec5835bb51508ca3725de Reviewed-by: hjk --- .../appmanagerruncontrol.cpp | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp index 95125318bbd..7eef034608a 100644 --- a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp +++ b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp @@ -212,25 +212,6 @@ public: } }; -// AppManagerDevicePerfProfilerSupport - -class AppManagerPerfProfilerSupport final : public RunWorker -{ -public: - explicit AppManagerPerfProfilerSupport(RunControl *runControl) - : RunWorker(runControl) - { - setId("AppManagerPerfProfilerSupport"); - - runControl->requestPerfChannel(); - auto profilee = createInferiorRunner(runControl, NoQmlDebugServices); - addStartDependency(profilee); - addStopDependency(profilee); - } -}; - -// Factories - class AppManagerRunWorkerFactory final : public RunWorkerFactory { public: @@ -315,7 +296,16 @@ class AppManagerPerfProfilerWorkerFactory final : public RunWorkerFactory public: AppManagerPerfProfilerWorkerFactory() { - setProduct(); + setProducer([](RunControl *runControl) { + auto worker = new RunWorker(runControl); + worker->setId("AppManagerPerfProfilerSupport"); + + runControl->requestPerfChannel(); + auto profilee = createInferiorRunner(runControl, NoQmlDebugServices); + worker->addStartDependency(profilee); + worker->addStopDependency(profilee); + return worker; + }); addSupportedRunMode("PerfRecorder"); addSupportedRunConfig(Constants::RUNANDDEBUGCONFIGURATION_ID); }