forked from qt-creator/qt-creator
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 <vikas.pachdha@qt.io>
This commit is contained in:
@@ -84,7 +84,6 @@ public:
|
|||||||
IosRunConfigurationWidget(IosRunConfiguration *runConfiguration);
|
IosRunConfigurationWidget(IosRunConfiguration *runConfiguration);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void argumentsLineEditTextEdited();
|
|
||||||
void updateValues();
|
void updateValues();
|
||||||
void setDeviceTypeIndex(int devIndex);
|
void setDeviceTypeIndex(int devIndex);
|
||||||
|
|
||||||
@@ -118,11 +117,6 @@ QWidget *IosRunConfiguration::createConfigurationWidget()
|
|||||||
return new IosRunConfigurationWidget(this);
|
return new IosRunConfigurationWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString IosRunConfiguration::commandLineArguments() const
|
|
||||||
{
|
|
||||||
return extraAspect<ArgumentsAspect>()->arguments();
|
|
||||||
}
|
|
||||||
|
|
||||||
void IosRunConfiguration::updateDisplayNames()
|
void IosRunConfiguration::updateDisplayNames()
|
||||||
{
|
{
|
||||||
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) == Constants::IOS_DEVICE_TYPE)
|
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) == Constants::IOS_DEVICE_TYPE)
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ public:
|
|||||||
QWidget *createConfigurationWidget() override;
|
QWidget *createConfigurationWidget() override;
|
||||||
IosDeployStep *deployStep() const;
|
IosDeployStep *deployStep() const;
|
||||||
|
|
||||||
QString commandLineArguments() const;
|
|
||||||
Utils::FileName profilePath() const;
|
Utils::FileName profilePath() const;
|
||||||
QString applicationName() const;
|
QString applicationName() const;
|
||||||
Utils::FileName bundleDirectory() const;
|
Utils::FileName bundleDirectory() const;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
#include <projectexplorer/runconfigurationaspects.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/taskhub.h>
|
#include <projectexplorer/taskhub.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
@@ -99,7 +100,7 @@ IosRunner::IosRunner(RunControl *runControl)
|
|||||||
stopRunningRunControl(runControl);
|
stopRunningRunControl(runControl);
|
||||||
auto runConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
|
auto runConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
|
||||||
m_bundleDir = runConfig->bundleDirectory().toString();
|
m_bundleDir = runConfig->bundleDirectory().toString();
|
||||||
m_arguments = QStringList(runConfig->commandLineArguments());
|
m_arguments = runConfig->extraAspect<ArgumentsAspect>()->arguments();
|
||||||
m_device = DeviceKitInformation::device(runConfig->target()->kit());
|
m_device = DeviceKitInformation::device(runConfig->target()->kit());
|
||||||
m_deviceType = runConfig->deviceType();
|
m_deviceType = runConfig->deviceType();
|
||||||
}
|
}
|
||||||
@@ -124,14 +125,6 @@ QString IosRunner::bundlePath()
|
|||||||
return m_bundleDir;
|
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()
|
QString IosRunner::deviceId()
|
||||||
{
|
{
|
||||||
IosDevice::ConstPtr dev = m_device.dynamicCast<const IosDevice>();
|
IosDevice::ConstPtr dev = m_device.dynamicCast<const IosDevice>();
|
||||||
@@ -207,7 +200,12 @@ void IosRunner::start()
|
|||||||
this, &IosRunner::handleToolExited);
|
this, &IosRunner::handleToolExited);
|
||||||
connect(m_toolHandler, &IosToolHandler::finished,
|
connect(m_toolHandler, &IosToolHandler::finished,
|
||||||
this, &IosRunner::handleFinished);
|
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()
|
void IosRunner::stop()
|
||||||
@@ -388,7 +386,7 @@ IosQmlProfilerSupport::IosQmlProfilerSupport(RunControl *runControl)
|
|||||||
auto iosRunConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
|
auto iosRunConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration());
|
||||||
StandardRunnable runnable;
|
StandardRunnable runnable;
|
||||||
runnable.executable = iosRunConfig->localExecutable().toUserOutput();
|
runnable.executable = iosRunConfig->localExecutable().toUserOutput();
|
||||||
runnable.commandLineArguments = iosRunConfig->commandLineArguments();
|
runnable.commandLineArguments = iosRunConfig->extraAspect<ArgumentsAspect>()->arguments();
|
||||||
runControl->setDisplayName(iosRunConfig->applicationName());
|
runControl->setDisplayName(iosRunConfig->applicationName());
|
||||||
runControl->setRunnable(runnable);
|
runControl->setRunnable(runnable);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ public:
|
|||||||
void setQmlDebugging(QmlDebug::QmlDebugServicesPreset qmlDebugServices);
|
void setQmlDebugging(QmlDebug::QmlDebugServicesPreset qmlDebugServices);
|
||||||
|
|
||||||
QString bundlePath();
|
QString bundlePath();
|
||||||
QStringList extraArgs();
|
|
||||||
QString deviceId();
|
QString deviceId();
|
||||||
IosToolHandler::RunKind runType();
|
IosToolHandler::RunKind runType();
|
||||||
bool cppDebug() const;
|
bool cppDebug() const;
|
||||||
@@ -84,7 +83,7 @@ private:
|
|||||||
|
|
||||||
IosToolHandler *m_toolHandler = nullptr;
|
IosToolHandler *m_toolHandler = nullptr;
|
||||||
QString m_bundleDir;
|
QString m_bundleDir;
|
||||||
QStringList m_arguments;
|
QString m_arguments;
|
||||||
ProjectExplorer::IDevice::ConstPtr m_device;
|
ProjectExplorer::IDevice::ConstPtr m_device;
|
||||||
IosDeviceType m_deviceType;
|
IosDeviceType m_deviceType;
|
||||||
bool m_cppDebug = false;
|
bool m_cppDebug = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user