forked from qt-creator/qt-creator
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:
@@ -336,8 +336,8 @@ IDevice::ConstPtr DeviceProfileInformation::device(const Profile *p)
|
|||||||
Core::Id DeviceProfileInformation::deviceId(const Profile *p)
|
Core::Id DeviceProfileInformation::deviceId(const Profile *p)
|
||||||
{
|
{
|
||||||
if (p) {
|
if (p) {
|
||||||
QByteArray idname = p->value(Core::Id(DEVICE_INFORMATION)).toByteArray();
|
QString idname = p->value(Core::Id(DEVICE_INFORMATION)).toString();
|
||||||
return idname.isEmpty() ? IDevice::invalidId() : Core::Id(idname.constData());
|
return idname.isEmpty() ? IDevice::invalidId() : Core::Id(idname);
|
||||||
}
|
}
|
||||||
return IDevice::invalidId();
|
return IDevice::invalidId();
|
||||||
}
|
}
|
||||||
@@ -349,7 +349,7 @@ void DeviceProfileInformation::setDevice(Profile *p, IDevice::ConstPtr dev)
|
|||||||
|
|
||||||
void DeviceProfileInformation::setDeviceId(Profile *p, const Core::Id id)
|
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
|
} // namespace ProjectExplorer
|
||||||
|
Reference in New Issue
Block a user