summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/devicesupport/idevice.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-07-16 13:59:39 +0200
committerTobias Hunger <tobias.hunger@qt.io>2018-07-24 09:04:54 +0000
commit80c2ce118d2e40a6b94117c46524c784d4737a52 (patch)
tree294ca26cbd2ae3c12b7f9d19923fbee07406848e /src/plugins/projectexplorer/devicesupport/idevice.cpp
parent48850dfa4d47cd8ae6ac871a0438c9c164e073f5 (diff)
downloadqt-creator-80c2ce118d2e40a6b94117c46524c784d4737a52.tar.gz
ProjectExplorer: Modernize even more
Use unique_ptr for all *Private classes, except for those in singletons. Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/devicesupport/idevice.cpp')
-rw-r--r--src/plugins/projectexplorer/devicesupport/idevice.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp
index 6dd073962c..2ff4090ffd 100644
--- a/src/plugins/projectexplorer/devicesupport/idevice.cpp
+++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp
@@ -165,7 +165,7 @@ IDevice::IDevice() : d(new Internal::IDevicePrivate)
}
IDevice::IDevice(Core::Id type, Origin origin, MachineType machineType, Core::Id id)
- : d(new Internal::IDevicePrivate)
+ : d(std::make_unique<Internal::IDevicePrivate>())
{
d->type = type;
d->origin = origin;
@@ -177,15 +177,12 @@ IDevice::IDevice(Core::Id type, Origin origin, MachineType machineType, Core::Id
IDevice::IDevice(const IDevice &other)
: QEnableSharedFromThis<IDevice>(other)
- , d(new Internal::IDevicePrivate)
+ , d(std::make_unique<Internal::IDevicePrivate>())
{
*d = *other.d;
}
-IDevice::~IDevice()
-{
- delete d;
-}
+IDevice::~IDevice() = default;
/*!
Specifies a free-text name for the device to be displayed in GUI elements.