Debian Codegraph @

project/bundles/3rdparty/ext_kf6/solid-iokit-fixes.patch

raw
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index b42eee08..4599b0c8 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -104,6 +104,13 @@ ecm_install_po_files_as_qm(poqm)
6
7 include(SolidBackendsMacros)
8
9 +remove_definitions(
10 + -DQT_NO_CAST_FROM_ASCII
11 + -DQT_NO_CAST_TO_ASCII
12 + -DQT_NO_URL_CAST_FROM_STRING
13 + -DQT_NO_CAST_FROM_BYTEARRAY
14 +)
15 +
16 add_device_backends_begin()
17 add_device_backend(fakehw)
18 if (CMAKE_SYSTEM_NAME MATCHES Linux)
19 @@ -143,6 +150,7 @@ endif()
20
21 add_device_backends_cmake()
22
23 +
24 add_subdirectory(src)
25 if (BUILD_TESTING)
26 add_subdirectory(autotests)
27 diff --git a/src/solid/devices/backends/iokit/iokitdevice.cpp b/src/solid/devices/backends/iokit/iokitdevice.cpp
28 index fd14478b..681616f0 100644
29 --- a/src/solid/devices/backends/iokit/iokitdevice.cpp
30 +++ b/src/solid/devices/backends/iokit/iokitdevice.cpp
31 @@ -113,7 +113,9 @@ static QString getParentDeviceUdi(const io_registry_entry_t &entry)
32
33 CFStringRef path = IORegistryEntryCopyPath(parent, kIOServicePlane);
34 QString result = QString::fromCFString(path);
35 - CFRelease(path);
36 + if (path) {
37 + CFRelease(path);
38 + }
39
40 // now we can release the parent
41 IOObjectRelease(parent);