diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-24 15:48:34 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-30 14:45:17 +0000 |
commit | 9ef93fa153e9093f7b1b9c901192dcf8282b6c3d (patch) | |
tree | de418a632ef0a7f7d969c7dfe08e166368a069c1 /src/plugins/platforms/windows/qwindowsscreen.h | |
parent | 39fc377bf105ba09e2a8f9acae467dc789b96525 (diff) |
Windows QPA plugin: Use member initialization
Use C++ 11 member initialization in value-type structs.
Task-number: QTBUG-51673
Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsscreen.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h index 02a9dc3bc3..d442ea7131 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.h +++ b/src/plugins/platforms/windows/qwindowsscreen.h @@ -59,18 +59,16 @@ struct QWindowsScreenData LockScreen = 0x4 // Temporary screen existing during user change, etc. }; - QWindowsScreenData(); - QRect geometry; QRect availableGeometry; - QDpi dpi; + QDpi dpi{96, 96}; QSizeF physicalSizeMM; - int depth; - QImage::Format format; - unsigned flags; + int depth = 32; + QImage::Format format = QImage::Format_ARGB32_Premultiplied; + unsigned flags = VirtualDesktop; QString name; - Qt::ScreenOrientation orientation; - qreal refreshRateHz; + Qt::ScreenOrientation orientation = Qt::LandscapeOrientation; + qreal refreshRateHz = 60; }; class QWindowsScreen : public QPlatformScreen @@ -140,9 +138,9 @@ private: void removeScreen(int index); WindowsScreenList m_screens; - int m_lastDepth; - WORD m_lastHorizontalResolution; - WORD m_lastVerticalResolution; + int m_lastDepth = -1; + WORD m_lastHorizontalResolution = 0; + WORD m_lastVerticalResolution = 0; }; QT_END_NAMESPACE |