aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ios/iosrunner.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2018-05-07 12:20:04 +0200
committerhjk <[email protected]>2018-05-08 16:18:02 +0000
commite6d583913e95888f337d698757ed9f7d48a0cb55 (patch)
tree038b912c9c010d04b40d6f219531869e6d49342b /src/plugins/ios/iosrunner.cpp
parent900cbf857b6954129764874e2915c202cdf3ae98 (diff)
iOS: Use run arguments more directly
This also treats the arguments list as an arguments list for running, not as a single argument. Change-Id: Ia95e02c6324947081147b8bf8084cdd3a7d1eaf0 Reviewed-by: Vikas Pachdha <[email protected]>
Diffstat (limited to 'src/plugins/ios/iosrunner.cpp')
-rw-r--r--src/plugins/ios/iosrunner.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp
index 6a923be786e..0246bd1117f 100644
--- a/src/plugins/ios/iosrunner.cpp
+++ b/src/plugins/ios/iosrunner.cpp
@@ -37,6 +37,7 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/toolchain.h>
@@ -99,7 +100,7 @@ IosRunner::IosRunner(RunControl *runControl)
stopRunningRunControl(runControl);
auto runConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
m_bundleDir = runConfig->bundleDirectory().toString();
- m_arguments = QStringList(runConfig->commandLineArguments());
+ m_arguments = runConfig->extraAspect<ArgumentsAspect>()->arguments();
m_device = DeviceKitInformation::device(runConfig->target()->kit());
m_deviceType = runConfig->deviceType();
}
@@ -124,14 +125,6 @@ QString IosRunner::bundlePath()
return m_bundleDir;
}
-QStringList IosRunner::extraArgs()
-{
- QStringList res = m_arguments;
- if (m_qmlServerPort.isValid())
- res << QmlDebug::qmlDebugTcpArguments(m_qmlDebugServices, m_qmlServerPort);
- return res;
-}
-
QString IosRunner::deviceId()
{
IosDevice::ConstPtr dev = m_device.dynamicCast<const IosDevice>();
@@ -207,7 +200,12 @@ void IosRunner::start()
this, &IosRunner::handleToolExited);
connect(m_toolHandler, &IosToolHandler::finished,
this, &IosRunner::handleFinished);
- m_toolHandler->requestRunApp(bundlePath(), extraArgs(), runType(), deviceId());
+
+ QStringList args = QtcProcess::splitArgs(m_arguments, OsTypeMac);
+ if (m_qmlServerPort.isValid())
+ args.append(QmlDebug::qmlDebugTcpArguments(m_qmlDebugServices, m_qmlServerPort));
+
+ m_toolHandler->requestRunApp(bundlePath(), args, runType(), deviceId());
}
void IosRunner::stop()
@@ -388,7 +386,7 @@ IosQmlProfilerSupport::IosQmlProfilerSupport(RunControl *runControl)
auto iosRunConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
StandardRunnable runnable;
runnable.executable = iosRunConfig->localExecutable().toUserOutput();
- runnable.commandLineArguments = iosRunConfig->commandLineArguments();
+ runnable.commandLineArguments = iosRunConfig->extraAspect<ArgumentsAspect>()->arguments();
runControl->setDisplayName(iosRunConfig->applicationName());
runControl->setRunnable(runnable);