diff options
Diffstat (limited to 'src/plugins/webassembly')
-rw-r--r-- | src/plugins/webassembly/webassemblyrunconfiguration.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index c6ead8ae216..b8f3610ccc0 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -91,23 +91,18 @@ public: EmrunRunWorker(RunControl *runControl) : SimpleTargetRunner(runControl) { - m_portsGatherer = new PortsGatherer(runControl); - addStartDependency(m_portsGatherer); - } - - void start() final - { - CommandLine cmd = emrunCommand(runControl()->target(), - runControl()->aspect<WebBrowserSelectionAspect>()->currentBrowser(), - QString::number(m_portsGatherer->findEndPoint().port())); - Runnable r; - r.setCommandLine(cmd); - setRunnable(r); - - SimpleTargetRunner::start(); + auto portsGatherer = new PortsGatherer(runControl); + addStartDependency(portsGatherer); + + setStarter([this, runControl, portsGatherer] { + CommandLine cmd = emrunCommand(runControl->target(), + runControl->aspect<WebBrowserSelectionAspect>()->currentBrowser(), + QString::number(portsGatherer->findEndPoint().port())); + Runnable r; + r.setCommandLine(cmd); + SimpleTargetRunner::doStart(r, {}); + }); } - - PortsGatherer *m_portsGatherer; }; RunWorkerFactory::WorkerCreator makeEmrunWorker() |