summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevmouse
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-22 15:34:38 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-22 20:43:55 +0100
commit2c871dfd38d89d6415c2c25d47b4a0e9c8b2ef11 (patch)
tree838c06f64a85ab297a1f5ab42d12f25c6d9613ef /src/platformsupport/input/evdevmouse
parent7bb0d5379d74100593da4b14441a886f82c263b6 (diff)
Avoid initializing QFlags with 0 or nullptr in further cases
Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Where applicable, port over to member initialization, thus also fixing nullptr warnings. Change-Id: Iaaf2dbbbcf2952253390b8839fd15a1b17be32c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevmouse')
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp3
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index 6a53ad2088..a729eeb851 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -99,8 +99,7 @@ std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &de
}
QEvdevMouseHandler::QEvdevMouseHandler(const QString &device, int fd, bool abs, bool compression, int jitterLimit)
- : m_device(device), m_fd(fd), m_notify(0), m_x(0), m_y(0), m_prevx(0), m_prevy(0),
- m_abs(abs), m_compression(compression), m_buttons(0), m_prevInvalid(true)
+ : m_device(device), m_fd(fd), m_abs(abs), m_compression(compression)
{
setObjectName(QLatin1String("Evdev Mouse Handler"));
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
index 727f1a02f9..93314e885f 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
@@ -84,16 +84,16 @@ private:
QString m_device;
int m_fd;
- QSocketNotifier *m_notify;
- int m_x, m_y;
- int m_prevx, m_prevy;
+ QSocketNotifier *m_notify = nullptr;
+ int m_x = 0, m_y = 0;
+ int m_prevx = 0, m_prevy = 0;
bool m_abs;
bool m_compression;
Qt::MouseButtons m_buttons;
Qt::MouseButton m_button;
QEvent::Type m_eventType;
int m_jitterLimitSquared;
- bool m_prevInvalid;
+ bool m_prevInvalid = true;
int m_hardwareWidth;
int m_hardwareHeight;
qreal m_hardwareScalerY;