summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowspointerhandler.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-16 11:50:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-26 10:14:05 +0200
commite3470a98e98c8a789a4cb298a0afaacf0cc62ce9 (patch)
tree346f0960c073bfb87fd2969fc89dc693fab48e96 /src/plugins/platforms/windows/qwindowspointerhandler.h
parentd9edad81177954c89619b6dee70ca76f2f4709ef (diff)
Windows QPA: Use a QSharedPointer for the touch device
For reasons of symmetry with the tablet devices. As a drive by, give it more distinct IDs. Task-number: QTBUG-46412 Change-Id: Ie667621246b26db6fdda84c5ff2455fe38633cb3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowspointerhandler.h')
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h
index d0f0b816d3..6b02412e74 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.h
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.h
@@ -65,9 +65,9 @@ public:
bool translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result);
bool translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result);
- QPointingDevice *touchDevice() const { return m_touchDevice; }
- void setTouchDevice(QPointingDevice *d) { m_touchDevice = d; }
- static QPointingDevice *createTouchDevice(bool mouseEmulation);
+ const QPointingDevicePtr &touchDevice() const { return m_touchDevice; }
+ void setTouchDevice(const QPointingDevicePtr &d) { m_touchDevice = d; }
+ static QPointingDevicePtr createTouchDevice(bool mouseEmulation);
QWindow *windowUnderMouse() const { return m_windowUnderPointer.data(); }
void clearWindowUnderMouse() { m_windowUnderPointer = nullptr; }
@@ -83,7 +83,7 @@ private:
QPointingDevicePtr findTabletDevice(QPointingDevice::PointerType pointerType) const;
#endif
- QPointingDevice *m_touchDevice = nullptr;
+ QPointingDevicePtr m_touchDevice;
#if QT_CONFIG(tabletevent)
QList<QPointingDevicePtr> m_tabletDevices;
#endif