Commit 33348c63 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

IDevice: Make sure device is properly initialized



Even when default-constructed.

Change-Id: I5e7616b6e31685fe86aeba3f472ce87fad54e35f
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 5cf6ab5c
......@@ -155,6 +155,11 @@ namespace Internal {
class IDevicePrivate
{
public:
IDevicePrivate() :
origin(IDevice::AutoDetected),
availability(IDevice::DeviceAvailabilityUnknown)
{ }
QString displayName;
QString type;
IDevice::Origin origin;
......@@ -164,8 +169,7 @@ public:
} // namespace Internal
IDevice::IDevice() : d(new Internal::IDevicePrivate)
{
}
{ }
IDevice::IDevice(const QString &type, Origin origin, Core::Id id) : d(new Internal::IDevicePrivate)
{
......@@ -173,7 +177,6 @@ IDevice::IDevice(const QString &type, Origin origin, Core::Id id) : d(new Intern
d->origin = origin;
QTC_CHECK(origin == ManuallyAdded || id.isValid());
d->id = id.isValid() ? id : newId();
d->availability = DeviceAvailabilityUnknown;
}
IDevice::IDevice(const IDevice &other) : d(new Internal::IDevicePrivate)
......
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