QWindowsScreen: use correct return value of SetupDiDestroyDeviceInfoList
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 <marten.nordheim@qt.io> (cherry picked from commit fcaaebd5c8d5323f050fdcf07d16dc37bdba197b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a0c9b5f020
commit
28e8a377f1
@ -139,7 +139,7 @@ struct DevInfoHandleTraits
|
||||
{
|
||||
return reinterpret_cast<HDEVINFO>(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<DevInfoHandleTraits>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user