Commit a6f2a293 authored by hjk's avatar hjk Committed by Tobias Hunger

Kits: use Id::{from,to}Settings when appropriate

Change-Id: Id3bab8fee749a52e1336247aa3cb6d5d76410337
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 7a090b3d
......@@ -332,18 +332,12 @@ KitInformation::ItemList DeviceTypeKitInformation::toUserOutput(const Kit *k) co
const Core::Id DeviceTypeKitInformation::deviceTypeId(const Kit *k)
{
// FIXME: This should be fromSetting/toSetting instead.
if (!k)
return Core::Id();
QByteArray value = k->value(DEVICETYPE_INFORMATION).toByteArray();
if (value.isEmpty())
return Core::Id();
return Core::Id::fromName(value);
return k ? Core::Id::fromSetting(k->value(DEVICETYPE_INFORMATION)) : Core::Id();
}
void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
{
k->setValue(DEVICETYPE_INFORMATION, type.name());
k->setValue(DEVICETYPE_INFORMATION, type.toSetting());
}
// --------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment