summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandtouch_p.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-02-27 16:21:17 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-02-28 10:51:35 +0000
commit1fab644753443a525475740fc23172dedaa70d0e (patch)
treebca0a88662679acd150172f5a73f64d1604960cf /src/client/qwaylandtouch_p.h
parentc4bd9198b4a0fac809903dd2c09276c2c3c1b22e (diff)
Use default member initialization for raw pointers
Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/client/qwaylandtouch_p.h')
-rw-r--r--src/client/qwaylandtouch_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h
index 7d909769d..93a829e21 100644
--- a/src/client/qwaylandtouch_p.h
+++ b/src/client/qwaylandtouch_p.h
@@ -73,7 +73,7 @@ public:
private:
void registerDevice(int caps);
- QWaylandDisplay *mDisplay;
+ QWaylandDisplay *mDisplay = nullptr;
void touch_extension_touch(uint32_t time,
uint32_t id,
@@ -95,15 +95,15 @@ private:
QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
- QTouchDevice *mTouchDevice;
+ QTouchDevice *mTouchDevice = nullptr;
uint32_t mTimestamp;
int mPointsLeft;
uint32_t mFlags;
int mMouseSourceId;
QPointF mLastMouseLocal;
QPointF mLastMouseGlobal;
- QWindow *mTargetWindow;
- QWaylandInputDevice *mInputDevice;
+ QWindow *mTargetWindow = nullptr;
+ QWaylandInputDevice *mInputDevice = nullptr;
};
}