forked from qt-creator/qt-creator
ProjectExplorer: Reduce use of Runnable in SimpleTargetRunner
Runnable functionality is nowadays mostly accessed more directly in QtcProcess and its setup functions. Change-Id: I2a2b5433aef1d464dc58d5a35069376dee051d57 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "qmlprofilerruncontrol.h"
|
||||
|
||||
#include "qmlprofilerclientmanager.h"
|
||||
#include "qmlprofilertool.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -236,8 +235,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
|
||||
// In the TCP case, it doesn't hurt either to start the profiler before.
|
||||
addStartDependency(profiler);
|
||||
|
||||
setStarter([this, runControl, profiler, serverUrl] {
|
||||
Runnable debuggee = runControl->runnable();
|
||||
setStartModifier([this, profiler, serverUrl] {
|
||||
|
||||
QUrl serverUrl = profiler->serverUrl();
|
||||
QString code;
|
||||
@@ -251,12 +249,13 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
|
||||
QString arguments = Utils::ProcessArgs::quoteArg(
|
||||
QmlDebug::qmlDebugCommandLineArguments(QmlDebug::QmlProfilerServices, code, true));
|
||||
|
||||
if (!debuggee.command.arguments().isEmpty())
|
||||
arguments += ' ' + debuggee.command.arguments();
|
||||
Utils::CommandLine cmd = commandLine();
|
||||
const QString oldArgs = cmd.arguments();
|
||||
cmd.setArguments(arguments);
|
||||
cmd.addArgs(oldArgs, Utils::CommandLine::Raw);
|
||||
setCommandLine(cmd);
|
||||
|
||||
debuggee.command.setArguments(arguments);
|
||||
debuggee.device.reset();
|
||||
doStart(debuggee);
|
||||
forceRunOnHost();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user