QmlDebug: Streamline command line parameter creation

We always have a port now in advance and can construct the
command line directly.

Change-Id: I12dba553f4ef073d7c5b00477baf9fa0e5596bdb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2017-09-05 16:38:09 +02:00
parent a31ec6689d
commit 2edbefcb5d
2 changed files with 9 additions and 17 deletions

View File

@@ -283,7 +283,13 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
addStartDependency(m_profiler);
StandardRunnable debuggee = runnable().as<StandardRunnable>();
QString arguments = QmlDebug::qmlDebugArguments(QmlDebug::QmlProfilerServices, serverUrl);
QString code = serverUrl.scheme() == "socket"
? QString("file:%1").arg(serverUrl.path())
: QString("port:%1").arg(serverUrl.port());
QString arguments = QmlDebug::qmlDebugCommandLineArguments(QmlDebug::QmlProfilerServices,
code, true);
if (!debuggee.commandLineArguments.isEmpty())
arguments += ' ' + debuggee.commandLineArguments;