summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-05-19 15:23:12 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-20 19:47:06 +0000
commite8a29856509b5844bfc725b18335eeec825e18cc (patch)
tree15eaaa978960ff71f42d92ca175be5c7a067e961 /src/plugins
parent1b26b5bc2c49574b4bb0902011937637e9062a23 (diff)
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>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index 77de751102..61f7476159 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;
}