forked from qt-creator/qt-creator
Handle IDeviceFactory restoring in base class
Change-Id: Idb892bcff6b91dbc11a8271915e5cc86d1669e74 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -38,6 +38,7 @@ IosDeviceFactory::IosDeviceFactory()
|
||||
setDisplayName(IosDevice::name());
|
||||
setCombinedIcon(":/ios/images/iosdevicesmall.png",
|
||||
":/ios/images/iosdevice.png");
|
||||
setConstructionFunction([] { return ProjectExplorer::IDevice::Ptr(new IosDevice); });
|
||||
}
|
||||
|
||||
bool IosDeviceFactory::canRestore(const QVariantMap &map) const
|
||||
@@ -49,14 +50,5 @@ bool IosDeviceFactory::canRestore(const QVariantMap &map) const
|
||||
return true;
|
||||
}
|
||||
|
||||
ProjectExplorer::IDevice::Ptr IosDeviceFactory::restore(const QVariantMap &map) const
|
||||
{
|
||||
IosDevice *newDev = new IosDevice;
|
||||
newDev->fromMap(map);
|
||||
// updating the active ones should be enough...
|
||||
//IosDeviceManager::instance()->updateInfo(newDev->uniqueDeviceID());
|
||||
return ProjectExplorer::IDevice::Ptr(newDev);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Ios
|
||||
|
||||
Reference in New Issue
Block a user