summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-27 18:28:03 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-27 20:18:56 +0100
commit5982451ac60057948f19af9adcf2b9ebb611cdfa (patch)
treec29a432cfe2bade563db8d0dd25a2a9bc33a4465 /src
parent360a2e79c8abd90fb274b6dcbede222e1e5e37db (diff)
macOS: Class initialize QCocoaScreen members
Change-Id: I163858400da28668b8a85241e9e6b1d989227a3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.h8
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.h b/src/plugins/platforms/cocoa/qcocoascreen.h
index 60243b79be..7ec9a2b5af 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.h
+++ b/src/plugins/platforms/cocoa/qcocoascreen.h
@@ -99,18 +99,18 @@ private:
static void add(CGDirectDisplayID displayId);
void remove();
- CGDirectDisplayID m_displayId = 0;
+ CGDirectDisplayID m_displayId = kCGNullDirectDisplay;
QRect m_geometry;
QRect m_availableGeometry;
QDpi m_logicalDpi;
- qreal m_refreshRate;
- int m_depth;
+ qreal m_refreshRate = 0;
+ int m_depth = 0;
QString m_name;
QImage::Format m_format;
QSizeF m_physicalSize;
QCocoaCursor *m_cursor;
- qreal m_devicePixelRatio;
+ qreal m_devicePixelRatio = 0;
CVDisplayLinkRef m_displayLink = nullptr;
dispatch_source_t m_displayLinkSource = nullptr;
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index 886198d9d5..7a54f616d0 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -127,7 +127,7 @@ void QCocoaScreen::cleanupScreens()
void QCocoaScreen::remove()
{
- m_displayId = 0; // Prevent stale references during removal
+ m_displayId = kCGNullDirectDisplay; // Prevent stale references during removal
// This may result in the application responding to QGuiApplication::screenRemoved
// by moving the window to another screen, either by setGeometry, or by setScreen.