Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/iokitdeviceinterface.cpp
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright 2009 Harald Fernengel <harry@kdevelop.org> | 2 | Copyright 2009 Harald Fernengel <harry@kdevelop.org> | ||
3 | Copyright 2017 René J.V. Bertin <rjvbertin@gmail.com> | ||||
3 | 4 | | |||
4 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public | ||
Context not available. | |||||
23 | using namespace Solid::Backends::IOKit; | 24 | using namespace Solid::Backends::IOKit; | ||
24 | 25 | | |||
25 | DeviceInterface::DeviceInterface(IOKitDevice *device) | 26 | DeviceInterface::DeviceInterface(IOKitDevice *device) | ||
26 | : QObject(device), m_device(device) | 27 | : QObject(device) | ||
28 | , m_device(device) | ||||
29 | , copy(0) | ||||
27 | { | 30 | { | ||
28 | } | 31 | } | ||
29 | 32 | | |||
33 | DeviceInterface::DeviceInterface(const IOKitDevice *device) | ||||
34 | : QObject(device->parent()), copy(new IOKitDevice(*device)) | ||||
35 | { | ||||
36 | m_device = copy; | ||||
37 | } | ||||
38 | | ||||
30 | DeviceInterface::~DeviceInterface() | 39 | DeviceInterface::~DeviceInterface() | ||
31 | { | 40 | { | ||
41 | if (copy) { | ||||
42 | delete copy; | ||||
43 | copy = 0; | ||||
44 | } | ||||
32 | } | 45 | } | ||
33 | 46 | | |||
Context not available. |