forked from qt-creator/qt-creator
ProjectExplorer: Move common bits of IDeviceFactory::canRestore
... to the single user. As effect, all but the ios re-implementation are not needed. Change-Id: I3c8b8c5d4ab3c8eac70c0bd534c5f1b33f8a3063 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -69,8 +69,6 @@ ProjectExplorer::IDevice::Ptr IosDeviceFactory::create() const
|
||||
|
||||
bool IosDeviceFactory::canRestore(const QVariantMap &map) const
|
||||
{
|
||||
if (ProjectExplorer::IDevice::typeFromMap(map) != Constants::IOS_DEVICE_TYPE)
|
||||
return false;
|
||||
QVariantMap vMap = map.value(QLatin1String(Constants::EXTRA_INFO_KEY)).toMap();
|
||||
if (vMap.isEmpty()
|
||||
|| vMap.value(QLatin1String("deviceName")).toString() == QLatin1String("*unknown*"))
|
||||
|
||||
@@ -67,11 +67,6 @@ ProjectExplorer::IDevice::Ptr IosSimulatorFactory::create() const
|
||||
return ProjectExplorer::IDevice::Ptr();
|
||||
}
|
||||
|
||||
bool IosSimulatorFactory::canRestore(const QVariantMap &map) const
|
||||
{
|
||||
return ProjectExplorer::IDevice::typeFromMap(map) == deviceType();
|
||||
}
|
||||
|
||||
ProjectExplorer::IDevice::Ptr IosSimulatorFactory::restore(const QVariantMap &map) const
|
||||
{
|
||||
QTC_ASSERT(canRestore(map), return ProjectExplorer::IDevice::Ptr());
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
|
||||
bool canCreate() const override;
|
||||
ProjectExplorer::IDevice::Ptr create() const override;
|
||||
bool canRestore(const QVariantMap &map) const override;
|
||||
ProjectExplorer::IDevice::Ptr restore(const QVariantMap &map) const override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user