From 1969c7e2c8797ee84b6ae64e4b8030f0402683c9 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 4 Mar 2025 11:46:30 +0100 Subject: RunWorker: Use postMessage instead of appendMessage Limit the usage of RunWorker::appendMessage() and use RunControl::postMessage() instead, as the RunWorker class is going to disappear in the long term. Task-number: QTCREATORBUG-29168 Change-Id: I383da81d7a6d33ec32becd502b28be33bb62e0de Reviewed-by: hjk --- src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/qtapplicationmanager') diff --git a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp index 7621100003f..312bb6d0e94 100644 --- a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp +++ b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp @@ -95,8 +95,8 @@ static RunWorker *createInferiorRunner(RunControl *runControl, QmlDebugServicesP worker->setProcessMode(ProcessMode::Writer); worker->setCommandLine(cmd); - worker->appendMessage(Tr::tr("Starting Application Manager debugging..."), NormalMessageFormat); - worker->appendMessage(Tr::tr("Using: %1.").arg(cmd.toUserOutput()), NormalMessageFormat); + runControl->postMessage(Tr::tr("Starting Application Manager debugging..."), NormalMessageFormat); + runControl->postMessage(Tr::tr("Using: %1.").arg(cmd.toUserOutput()), NormalMessageFormat); }); return worker; } @@ -109,8 +109,8 @@ public: setProducer([](RunControl *runControl) { auto worker = new ProcessRunner(runControl); worker->setId("ApplicationManagerPlugin.Run.TargetRunner"); - QObject::connect(worker, &RunWorker::stopped, worker, [worker, runControl] { - worker->appendMessage( + QObject::connect(worker, &RunWorker::stopped, worker, [runControl] { + runControl->postMessage( Tr::tr("%1 exited.").arg(runControl->commandLine().toUserOutput()), OutputFormat::NormalMessageFormat); }); -- cgit v1.2.3