From 73475480f749628cc37880902ae34dd8b7480b27 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 19 Jan 2024 10:49:16 +0100 Subject: [PATCH] iOS: Do not decorate the iOS Simulator device with "ready to use" icon The iOS Simulator device is always there, and always usable, it never can be unavailable. Since now the device state leads to a decoration in the device selector(s), always having a "connected" bubble there looks confusing. Remove it. Change-Id: Ia218e05367a18841e966ea8566e16ad859a09597 Reviewed-by: Christian Kandeler --- src/plugins/ios/iosrunconfiguration.cpp | 4 +++- src/plugins/ios/iossimulator.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index 961a7c1c501..334f27345d2 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -92,6 +92,8 @@ bool IosRunConfiguration::isEnabled() const Utils::Id devType = DeviceTypeKitAspect::deviceTypeId(kit()); if (devType != Constants::IOS_DEVICE_TYPE && devType != Constants::IOS_SIMULATOR_TYPE) return false; + if (devType == Constants::IOS_SIMULATOR_TYPE) + return true; IDevice::ConstPtr dev = DeviceKitAspect::device(kit()); if (dev.isNull() || dev->deviceState() != IDevice::DeviceReadyToUse) @@ -251,7 +253,7 @@ QString IosRunConfiguration::disabledReason() const return Tr::tr("No device chosen. Enable developer mode on a device."); // should not happen else return Tr::tr("No device available."); - } else { + } else if (devType == Constants::IOS_DEVICE_TYPE) { switch (dev->deviceState()) { case IDevice::DeviceReadyToUse: break; diff --git a/src/plugins/ios/iossimulator.cpp b/src/plugins/ios/iossimulator.cpp index 185db8f429d..e030fe911e0 100644 --- a/src/plugins/ios/iossimulator.cpp +++ b/src/plugins/ios/iossimulator.cpp @@ -30,7 +30,7 @@ IosSimulator::IosSimulator(Id id) setOsType(Utils::OsTypeMac); settings()->displayName.setDefaultValue(Tr::tr("iOS Simulator")); setDisplayType(Tr::tr("iOS Simulator")); - setDeviceState(DeviceReadyToUse); + setDeviceState(DeviceStateUnknown); } IosSimulator::IosSimulator()