Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/iokitdeviceinterface.h
- This file was copied to src/solid/devices/backends/iokit/dadictionary_p.h.
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 | ||
6 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either | ||
7 | version 2.1 of the License, or (at your option) version 3, or any | 8 | version 2.1 of the License, or (at your option) version 3, or any | ||
8 | later version accepted by the membership of KDE e.V. (or its | 9 | later version accepted by the membership of KDE e.V. (or its | ||
9 | successor approved by the membership of KDE e.V.), which shall | 10 | successor approved by the membership of KDE e.V.), which shall | ||
10 | act as a proxy defined in Section 6 of version 3 of the license. | 11 | act as a proxy defined in Section 6 of version 3 of the license. | ||
Show All 23 Lines | |||||
34 | namespace IOKit | 35 | namespace IOKit | ||
35 | { | 36 | { | ||
36 | class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface | 37 | class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface | ||
37 | { | 38 | { | ||
38 | Q_OBJECT | 39 | Q_OBJECT | ||
39 | Q_INTERFACES(Solid::Ifaces::DeviceInterface) | 40 | Q_INTERFACES(Solid::Ifaces::DeviceInterface) | ||
40 | public: | 41 | public: | ||
41 | DeviceInterface(IOKitDevice *device); | 42 | DeviceInterface(IOKitDevice *device); | ||
43 | // the ctor taking a const device* argument makes a deep | ||||
44 | // copy of the IOKitDevice; any property changes made via | ||||
45 | // the resulting instance will not affect the original device. | ||||
46 | DeviceInterface(const IOKitDevice *device); | ||||
42 | virtual ~DeviceInterface(); | 47 | virtual ~DeviceInterface(); | ||
43 | 48 | | |||
44 | protected: | 49 | protected: | ||
45 | IOKitDevice *m_device; | 50 | IOKitDevice *m_device; | ||
51 | IOKitDevice *m_deviceCopy; | ||||
kfunk: `m_` prefix missing. Would call it `m_deviceCopy`. | |||||
46 | }; | 52 | }; | ||
47 | } | 53 | } | ||
48 | } | 54 | } | ||
49 | } | 55 | } | ||
50 | 56 | | |||
51 | #endif // SOLID_BACKENDS_IOKIT_DEVICEINTERFACE_H | 57 | #endif // SOLID_BACKENDS_IOKIT_DEVICEINTERFACE_H |
m_ prefix missing. Would call it m_deviceCopy.