Device support: Remove fallbacks for Creator < 2.6.

A grace period of two minor versions seems enough.

Change-Id: If29ddae40b0ed70ba6c26a2990e958f2859c03b9
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
Christian Kandeler
2013-02-15 15:22:01 +01:00
parent 65fe327257
commit a2efb6f321
2 changed files with 0 additions and 34 deletions

View File

@@ -153,10 +153,6 @@ void DeviceManager::load()
QList<IDevice::Ptr> userDevices;
if (reader.load(settingsFilePath(QLatin1String("/qtcreator/devices.xml"))))
userDevices = fromMap(reader.restoreValues().value(QLatin1String(DeviceManagerKey)).toMap());
else if (reader.load(settingsFilePath(QLatin1String("/devices.xml"))))
userDevices = fromMap(reader.restoreValues().value(QLatin1String(DeviceManagerKey)).toMap());
else
userDevices = loadPre2_6();
// Insert devices into the model. Prefer the higher device version when there are multiple
// devices with the same id.
foreach (IDevice::Ptr device, userDevices) {
@@ -176,35 +172,6 @@ void DeviceManager::load()
ensureOneDefaultDevicePerType();
}
// TODO: Remove in 2.8
QList<IDevice::Ptr> DeviceManager::loadPre2_6()
{
QList<IDevice::Ptr> devices;
QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("MaemoDeviceConfigs"));
const QVariantHash defaultDevsHash = settings->value(QLatin1String("DefaultConfigs")).toHash();
for (QVariantHash::ConstIterator it = defaultDevsHash.constBegin();
it != defaultDevsHash.constEnd(); ++it) {
d->defaultDevices.insert(Core::Id(it.key()), Core::Id(it.value().toString()));
}
int count = settings->beginReadArray(QLatin1String("ConfigList"));
for (int i = 0; i < count; ++i) {
settings->setArrayIndex(i);
QVariantMap map;
foreach (const QString &key, settings->childKeys())
map.insert(key, settings->value(key));
const IDeviceFactory * const factory = restoreFactory(map);
if (!factory)
continue;
IDevice::Ptr device = factory->restore(map);
QTC_ASSERT(device, continue);
devices << device;
}
settings->endArray();
settings->endGroup();
return devices;
}
QList<IDevice::Ptr> DeviceManager::fromMap(const QVariantMap &map)
{
QList<IDevice::Ptr> devices;

View File

@@ -84,7 +84,6 @@ private:
DeviceManager(bool isInstance = false);
void load();
QList<IDevice::Ptr> loadPre2_6();
static const IDeviceFactory *restoreFactory(const QVariantMap &map);
QList<IDevice::Ptr> fromMap(const QVariantMap &map);
QVariantMap toMap() const;