From e8a29856509b5844bfc725b18335eeec825e18cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 19 May 2021 15:23:12 +0200 Subject: [PATCH] macOS: Fix warning about comparing different types in QCocoaScreen::isOnline Change-Id: Ieb70108d22bf254c69665e5b3e3a2988703e26a2 Reviewed-by: Alexandru Croitor (cherry picked from commit 640eb55c130c6c2c982dc212a8a5bd2b8fb7a225) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qcocoascreen.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm index 77de7511021..61f74761590 100644 --- a/src/plugins/platforms/cocoa/qcocoascreen.mm +++ b/src/plugins/platforms/cocoa/qcocoascreen.mm @@ -710,8 +710,8 @@ bool QCocoaScreen::isOnline() const // returning -1 to signal that the displayId is invalid. Some functions // will also assert or even crash in this case, so it's important that // we double check if a display is online before calling other functions. - auto isOnline = CGDisplayIsOnline(m_displayId); - static const uint32_t kCGDisplayIsDisconnected = int32_t(-1); + int isOnline = CGDisplayIsOnline(m_displayId); + static const int kCGDisplayIsDisconnected = 0xffffffff; return isOnline != kCGDisplayIsDisconnected && isOnline; }