aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-08-10 09:19:30 +0200
committerhjk <hjk@qt.io>2021-08-13 15:04:30 +0000
commit52e5023bcce391f7bd47b70e62c3f4ab04d319f7 (patch)
tree6288d6e7e901b6f2c8e3ef29e1cd1fe1f85be4f2 /src/plugins/qmlprofiler
parent33108795d6b2dd1e91942efb3c1c27ad23342295 (diff)
ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp6
-rw-r--r--src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp10
2 files changed, 7 insertions, 9 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
index 5dd244cba4..91eff9a9bb 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
@@ -251,10 +251,10 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
QString arguments = Utils::ProcessArgs::quoteArg(
QmlDebug::qmlDebugCommandLineArguments(QmlDebug::QmlProfilerServices, code, true));
- if (!debuggee.commandLineArguments.isEmpty())
- arguments += ' ' + debuggee.commandLineArguments;
+ if (!debuggee.command.arguments().isEmpty())
+ arguments += ' ' + debuggee.command.arguments();
- debuggee.commandLineArguments = arguments;
+ debuggee.command.setArguments(arguments);
doStart(debuggee, {});
});
diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
index 49eeacdde3..5aebc2243f 100644
--- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
+++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
@@ -56,7 +56,7 @@ void LocalQmlProfilerRunnerTest::testRunner()
int runCount = 0;
int stopCount = 0;
- debuggee.executable = Utils::FilePath::fromString("\\-/|\\-/");
+ debuggee.command.setExecutable(Utils::FilePath::fromString("\\-/|\\-/"));
debuggee.environment = Utils::Environment::systemEnvironment();
// should not be used anywhere but cannot be empty
@@ -109,10 +109,8 @@ void LocalQmlProfilerRunnerTest::testRunner()
QVERIFY(profiler.isNull());
serverUrl = Utils::urlFromLocalSocket();
- debuggee.executable = Utils::FilePath::fromString(QCoreApplication::applicationFilePath());
-
// comma is used to specify a test function. In this case, an invalid one.
- debuggee.commandLineArguments = QString("-test QmlProfiler,");
+ debuggee.command = Utils::CommandLine(QCoreApplication::applicationFilePath(), {"-test", "QmlProfiler,"});
runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->setRunnable(debuggee);
profiler = new LocalQmlProfilerSupport(runControl, serverUrl);
@@ -129,7 +127,7 @@ void LocalQmlProfilerRunnerTest::testRunner()
QTRY_VERIFY(runControl.isNull());
QVERIFY(profiler.isNull());
- debuggee.commandLineArguments.clear();
+ debuggee.command.setArguments({});
serverUrl.clear();
serverUrl = Utils::urlFromLocalHostAndFreePort();
runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
@@ -149,7 +147,7 @@ void LocalQmlProfilerRunnerTest::testRunner()
QTRY_VERIFY(runControl.isNull());
QVERIFY(profiler.isNull());
- debuggee.commandLineArguments = QString("-test QmlProfiler,");
+ debuggee.command.setArguments("-test QmlProfiler,");
serverUrl.setScheme(Utils::urlSocketScheme());
{
Utils::TemporaryFile file("file with spaces");