macOS: Fix warning about comparing different types in QCocoaScreen::isOnline

Pick-to: 6.1
Change-Id: Ieb70108d22bf254c69665e5b3e3a2988703e26a2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2021-05-19 15:23:12 +02:00
parent 486b7a8f8a
commit 640eb55c13
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}