summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-24 15:48:34 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-30 14:45:17 +0000
commit9ef93fa153e9093f7b1b9c901192dcf8282b6c3d (patch)
treede418a632ef0a7f7d969c7dfe08e166368a069c1 /src/plugins/platforms/windows/qwindowswindow.h
parent39fc377bf105ba09e2a8f9acae467dc789b96525 (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/qwindowswindow.h')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index dd433a3ca8..fcd8c1f0c9 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -89,22 +89,20 @@ struct QWindowCreationContext
QRect obtainedGeometry;
QMargins margins;
QMargins customMargins; // User-defined, additional frame for WM_NCCALCSIZE
- int frameX; // Passed on to CreateWindowEx(), including frame.
- int frameY;
- int frameWidth;
- int frameHeight;
+ int frameX = CW_USEDEFAULT; // Passed on to CreateWindowEx(), including frame.
+ int frameY = CW_USEDEFAULT;
+ int frameWidth = CW_USEDEFAULT;
+ int frameHeight = CW_USEDEFAULT;
};
struct QWindowsWindowData
{
- QWindowsWindowData() : hwnd(0), embedded(false) {}
-
Qt::WindowFlags flags;
QRect geometry;
QMargins frame; // Do not use directly for windows, see FrameDirty.
QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
- HWND hwnd;
- bool embedded;
+ HWND hwnd = 0;
+ bool embedded = false;
static QWindowsWindowData create(const QWindow *w,
const QWindowsWindowData &parameters,
@@ -335,20 +333,20 @@ private:
void fireExpose(const QRegion &region, bool force=false);
mutable QWindowsWindowData m_data;
- mutable unsigned m_flags;
- HDC m_hdc;
- Qt::WindowState m_windowState;
- qreal m_opacity;
+ mutable unsigned m_flags = WithinCreate;
+ HDC m_hdc = 0;
+ Qt::WindowState m_windowState = Qt::WindowNoState;
+ qreal m_opacity = 1;
#ifndef QT_NO_CURSOR
CursorHandlePtr m_cursor;
#endif
- QWindowsOleDropTarget *m_dropTarget;
- unsigned m_savedStyle;
+ QWindowsOleDropTarget *m_dropTarget = nullptr;
+ unsigned m_savedStyle = 0;
QRect m_savedFrameGeometry;
const QSurfaceFormat m_format;
- HICON m_iconSmall;
- HICON m_iconBig;
- void *m_surface;
+ HICON m_iconSmall = 0;
+ HICON m_iconBig = 0;
+ void *m_surface = nullptr;
};
#ifndef QT_NO_DEBUG_STREAM