mirror of https://github.com/qt/qtbase.git
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:
parent
486b7a8f8a
commit
640eb55c13
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue