forked from qt-creator/qt-creator
ios: Fix the default device icons
In 4.2 the IDevice constructors need to set the device icon, and I missed a few constructors. This should fix it. This patch will not apply to master, and should be skipped when merging. Change-Id: I66cf529dfe539a90a753dd15e8f069e1f11e8176 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -79,6 +79,16 @@ static QString CFStringRef2QString(CFStringRef s)
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
static const QList<Utils::Icon>& iosDeviceIcon()
|
||||
{
|
||||
static const QList<Utils::Icon> icon =
|
||||
{Utils::Icon({{":/ios/images/iosdevicesmall.png",
|
||||
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint),
|
||||
Utils::Icon({{":/ios/images/iosdevice.png",
|
||||
Utils::Theme::IconsBaseColor}})};
|
||||
return icon;
|
||||
}
|
||||
|
||||
IosDevice::IosDevice()
|
||||
: IDevice(Core::Id(Constants::IOS_DEVICE_TYPE),
|
||||
IDevice::AutoDetected,
|
||||
@@ -92,10 +102,7 @@ IosDevice::IosDevice()
|
||||
ports.addRange(Utils::Port(Constants::IOS_DEVICE_PORT_START),
|
||||
Utils::Port(Constants::IOS_DEVICE_PORT_END));
|
||||
setFreePorts(ports);
|
||||
setDeviceIcon({Utils::Icon({{":/ios/images/iosdevicesmall.png",
|
||||
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint),
|
||||
Utils::Icon({{":/ios/images/iosdevice.png",
|
||||
Utils::Theme::IconsBaseColor}})});
|
||||
setDeviceIcon(iosDeviceIcon());
|
||||
}
|
||||
|
||||
IosDevice::IosDevice(const IosDevice &other)
|
||||
@@ -112,6 +119,7 @@ IosDevice::IosDevice(const QString &uid)
|
||||
{
|
||||
setDisplayName(IosDevice::name());
|
||||
setDeviceState(DeviceDisconnected);
|
||||
setDeviceIcon(iosDeviceIcon());
|
||||
}
|
||||
|
||||
|
||||
|
@@ -45,6 +45,16 @@ static const QLatin1String iosDeviceTypeDisplayNameKey = QLatin1String("displayN
|
||||
static const QLatin1String iosDeviceTypeTypeKey = QLatin1String("type");
|
||||
static const QLatin1String iosDeviceTypeIdentifierKey = QLatin1String("identifier");
|
||||
|
||||
static const QList<Utils::Icon>& iosSimulatorIcon()
|
||||
{
|
||||
static const QList<Utils::Icon> icon =
|
||||
{Utils::Icon({{":/ios/images/iosdevicesmall.png",
|
||||
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint),
|
||||
Utils::Icon({{":/ios/images/iosdevice.png",
|
||||
Utils::Theme::IconsBaseColor}})};
|
||||
return icon;
|
||||
}
|
||||
|
||||
IosSimulator::IosSimulator(Core::Id id)
|
||||
: IDevice(Core::Id(Constants::IOS_SIMULATOR_TYPE),
|
||||
IDevice::AutoDetected,
|
||||
@@ -54,10 +64,7 @@ IosSimulator::IosSimulator(Core::Id id)
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||
setDeviceState(DeviceReadyToUse);
|
||||
setDeviceIcon({Utils::Icon({{":/ios/images/iosdevicesmall.png",
|
||||
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint),
|
||||
Utils::Icon({{":/ios/images/iosdevice.png",
|
||||
Utils::Theme::IconsBaseColor}})});
|
||||
setDeviceIcon(iosSimulatorIcon());
|
||||
}
|
||||
|
||||
IosSimulator::IosSimulator()
|
||||
@@ -69,6 +76,7 @@ IosSimulator::IosSimulator()
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||
setDeviceState(DeviceReadyToUse);
|
||||
setDeviceIcon(iosSimulatorIcon());
|
||||
}
|
||||
|
||||
IosSimulator::IosSimulator(const IosSimulator &other)
|
||||
@@ -76,6 +84,7 @@ IosSimulator::IosSimulator(const IosSimulator &other)
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||
setDeviceState(DeviceReadyToUse);
|
||||
setDeviceIcon(iosSimulatorIcon());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user