From 28e8a377f130fefce587f4265ab27b8c6437fd09 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 22 Jul 2024 20:07:04 +0200 Subject: [PATCH] QWindowsScreen: use correct return value of SetupDiDestroyDeviceInfoList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SetupDiDestroyDeviceInfoList() returns TRUE (1) and not ERROR_SUCCESS (0) so an assertion is triggered falsely on destruction. This amends 5183ca14344c04015b32ef407e4cdad1b370c841. Pick-to: 6.7 6.5 Task-number: QTBUG-127168 Change-Id: I03ea601e35c0cbcf44080379853e33362568122c Reviewed-by: MÃ¥rten Nordheim (cherry picked from commit fcaaebd5c8d5323f050fdcf07d16dc37bdba197b) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/windows/qwindowsscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index 74642be3398..2165c56d3c9 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -139,7 +139,7 @@ struct DevInfoHandleTraits { return reinterpret_cast(INVALID_HANDLE_VALUE); } - static bool close(Type handle) { return SetupDiDestroyDeviceInfoList(handle) == ERROR_SUCCESS; } + static bool close(Type handle) { return SetupDiDestroyDeviceInfoList(handle) == TRUE; } }; using DevInfoHandle = QUniqueHandle;