Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/iokitmanager.cpp
Show All 34 Lines | |||||
35 | { | 35 | { | ||
36 | namespace IOKit | 36 | namespace IOKit | ||
37 | { | 37 | { | ||
38 | 38 | | |||
39 | class IOKitManagerPrivate | 39 | class IOKitManagerPrivate | ||
40 | { | 40 | { | ||
41 | public: | 41 | public: | ||
42 | inline IOKitManagerPrivate() | 42 | inline IOKitManagerPrivate() | ||
43 | : port(0), source(0) | 43 | : port(nullptr), source(nullptr) | ||
44 | {} | 44 | {} | ||
45 | 45 | | |||
46 | IONotificationPortRef port; | 46 | IONotificationPortRef port; | ||
47 | CFRunLoopSourceRef source; | 47 | CFRunLoopSourceRef source; | ||
48 | 48 | | |||
49 | static const char *typeToName(Solid::DeviceInterface::Type type); | 49 | static const char *typeToName(Solid::DeviceInterface::Type type); | ||
50 | static QStringList devicesFromRegistry(io_iterator_t it); | 50 | static QStringList devicesFromRegistry(io_iterator_t it); | ||
51 | 51 | | |||
Show All 32 Lines | 83 | case Solid::DeviceInterface::Unknown: | |||
84 | return 0; | 84 | return 0; | ||
85 | case Solid::DeviceInterface::Processor: | 85 | case Solid::DeviceInterface::Processor: | ||
86 | return "AppleACPICPU"; | 86 | return "AppleACPICPU"; | ||
87 | case Solid::DeviceInterface::Battery: | 87 | case Solid::DeviceInterface::Battery: | ||
88 | return "AppleSmartBattery"; | 88 | return "AppleSmartBattery"; | ||
89 | 89 | | |||
90 | //Solid::DeviceInterface::GenericInterface: | 90 | //Solid::DeviceInterface::GenericInterface: | ||
91 | //Solid::DeviceInterface::Block: | 91 | //Solid::DeviceInterface::Block: | ||
92 | //Solid::DeviceInterface::StorageAccess: | 92 | case Solid::DeviceInterface::StorageAccess: | ||
93 | //Solid::DeviceInterface::StorageDrive: | 93 | case Solid::DeviceInterface::StorageDrive: | ||
94 | //Solid::DeviceInterface::OpticalDrive: | 94 | case Solid::DeviceInterface::StorageVolume: | ||
95 | //Solid::DeviceInterface::StorageVolume: | 95 | return "IOMedia"; | ||
96 | //Solid::DeviceInterface::OpticalDisc: | 96 | case Solid::DeviceInterface::OpticalDrive: | ||
97 | case Solid::DeviceInterface::OpticalDisc: | ||||
98 | return "IOCDMedia"; | ||||
anthonyfieroni: QStrinLiteral | |||||
No, not here. Check the return type and what the returned strings are used for. rjvbb: No, not here. Check the return type and what the returned strings are used for. | |||||
97 | //Solid::DeviceInterface::Camera: | 99 | //Solid::DeviceInterface::Camera: | ||
98 | //Solid::DeviceInterface::PortableMediaPlayer: | 100 | //Solid::DeviceInterface::PortableMediaPlayer: | ||
99 | } | 101 | } | ||
100 | 102 | | |||
101 | return 0; | 103 | return 0; | ||
102 | } | 104 | } | ||
103 | 105 | | |||
104 | IOKitManager::IOKitManager(QObject *parent) | 106 | IOKitManager::IOKitManager(QObject *parent) | ||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
QStrinLiteral