Profile: Use strings which simplifies the code a bit

Change-Id: Ibb34cfc837850803befe8ba4cd1696e2988bc738
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-06-26 15:37:21 +02:00
parent a285e26d76
commit 0af5148425

View File

@@ -336,8 +336,8 @@ IDevice::ConstPtr DeviceProfileInformation::device(const Profile *p)
Core::Id DeviceProfileInformation::deviceId(const Profile *p)
{
if (p) {
QByteArray idname = p->value(Core::Id(DEVICE_INFORMATION)).toByteArray();
return idname.isEmpty() ? IDevice::invalidId() : Core::Id(idname.constData());
QString idname = p->value(Core::Id(DEVICE_INFORMATION)).toString();
return idname.isEmpty() ? IDevice::invalidId() : Core::Id(idname);
}
return IDevice::invalidId();
}
@@ -349,7 +349,7 @@ void DeviceProfileInformation::setDevice(Profile *p, IDevice::ConstPtr dev)
void DeviceProfileInformation::setDeviceId(Profile *p, const Core::Id id)
{
p->setValue(Core::Id(DEVICE_INFORMATION), id.name());
p->setValue(Core::Id(DEVICE_INFORMATION), id.toString());
}
} // namespace ProjectExplorer