diff options
author | David Edmundson <davidedmundson@kde.org> | 2023-06-07 17:30:30 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2023-06-08 08:10:58 +0000 |
commit | d730fe137224475507ff7cc524ee7758ec2405d6 (patch) | |
tree | c1479d24ad712a5202463ba470be78f1b77481a9 | |
parent | 22ad18179e5175db0b56cf627eaeb806abc1133d (diff) |
client: initialize key repeat information
We can end up checking mRepeatKey.code before getting a key press is
recorded when the values are uninitialized.
This can happen if we get a key up for a previously held key or if key
repeats are disabled.
It's relatively harmless as it just stops a timer, but it can show up in
valgrind logs.
Change-Id: Ib7fe58b1976e9c89550c5a6252a34d66f83e2481
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/client/qwaylandinputdevice_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h index fce6e74cf..3f19f2b21 100644 --- a/src/client/qwaylandinputdevice_p.h +++ b/src/client/qwaylandinputdevice_p.h @@ -230,13 +230,13 @@ public: uint32_t mNativeModifiers = 0; struct repeatKey { - int key; - uint32_t code; - uint32_t time; + int key = 0; + uint32_t code = 0; + uint32_t time = 0 ; QString text; Qt::KeyboardModifiers modifiers; - uint32_t nativeVirtualKey; - uint32_t nativeModifiers; + uint32_t nativeVirtualKey = 0; + uint32_t nativeModifiers = 0; } mRepeatKey; QTimer mRepeatTimer; |