Ios: Move part of start setup into IosDebugSupport's c'tor

Task-number: QTCREATORBUG-29168
Change-Id: Id241748271a9accb9b7f84cdb3a128934bc056d4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2024-11-21 10:27:55 +01:00
parent 7a893394eb
commit cb1b71b026

View File

@@ -764,14 +764,6 @@ IosDebugSupport::IosDebugSupport(RunControl *runControl)
m_runner->setQmlDebugging(isQmlDebugging() ? QmlDebuggerServices : NoQmlDebugServices);
addStartDependency(m_runner);
}
void IosDebugSupport::start()
{
if (!m_runner->isAppRunning()) {
reportFailure(Tr::tr("Application not running."));
return;
}
if (device()->type() == Ios::Constants::IOS_DEVICE_TYPE) {
IosDevice::ConstPtr dev = std::dynamic_pointer_cast<const IosDevice>(device());
@@ -804,6 +796,14 @@ void IosDebugSupport::start()
setStartMode(AttachToLocalProcess);
setIosPlatform("ios-simulator");
}
}
void IosDebugSupport::start()
{
if (!m_runner->isAppRunning()) {
reportFailure(Tr::tr("Application not running."));
return;
}
const IosDeviceTypeAspect::Data *data = runControl()->aspectData<IosDeviceTypeAspect>();
QTC_ASSERT(data, reportFailure("Broken IosDeviceTypeAspect setup."); return);