diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-08-17 13:54:01 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-08-18 12:44:38 +0200 |
commit | e1c9880d94976ee279642938e7513ed64694edeb (patch) | |
tree | dab91c96e7a14b8ff743d4a9c345704daa331ec1 /src/client/qwaylandinputdevice_p.h | |
parent | 287efec1dbd4a7b619326d39470424b8b68108ac (diff) |
Avoid memory leaks in QWaylandInputDevice
Use QScopedPointer and QObject-parenting to get rid of the allocated
objects.
Change-Id: I8a0ce2d1bae6a69b458a01731489813ef2aa8044
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/client/qwaylandinputdevice_p.h')
-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 3e6484314..b9d7451b5 100644 --- a/src/client/qwaylandinputdevice_p.h +++ b/src/client/qwaylandinputdevice_p.h @@ -193,11 +193,11 @@ protected: QScopedPointer<QWaylandPrimarySelectionDeviceV1> mPrimarySelectionDevice; #endif - Keyboard *mKeyboard = nullptr; - Pointer *mPointer = nullptr; - QWaylandPointerGestureSwipe *mPointerGestureSwipe = nullptr; - QWaylandPointerGesturePinch *mPointerGesturePinch = nullptr; - Touch *mTouch = nullptr; + QScopedPointer<Keyboard> mKeyboard; + QScopedPointer<Pointer> mPointer; + QScopedPointer<QWaylandPointerGestureSwipe> mPointerGestureSwipe; + QScopedPointer<QWaylandPointerGesturePinch> mPointerGesturePinch; + QScopedPointer<Touch> mTouch; QScopedPointer<QWaylandTextInput> mTextInput; QScopedPointer<QWaylandTextInputMethod> mTextInputMethod; |