macOS: Fix warning about comparing different types in QCocoaScreen::isOnline
Change-Id: Ieb70108d22bf254c69665e5b3e3a2988703e26a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 640eb55c130c6c2c982dc212a8a5bd2b8fb7a225) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1b26b5bc2c
commit
e8a2985650
@ -710,8 +710,8 @@ bool QCocoaScreen::isOnline() const
|
|||||||
// returning -1 to signal that the displayId is invalid. Some functions
|
// 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
|
// 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.
|
// we double check if a display is online before calling other functions.
|
||||||
auto isOnline = CGDisplayIsOnline(m_displayId);
|
int isOnline = CGDisplayIsOnline(m_displayId);
|
||||||
static const uint32_t kCGDisplayIsDisconnected = int32_t(-1);
|
static const int kCGDisplayIsDisconnected = 0xffffffff;
|
||||||
return isOnline != kCGDisplayIsDisconnected && isOnline;
|
return isOnline != kCGDisplayIsDisconnected && isOnline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user