aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents_p_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-07-14 11:17:54 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-07-15 13:26:56 +0000
commit288c1425d6e3ac200dd8e687f13de6ce4a41260b (patch)
tree78cba9a5ffd2416f0c2a703c8ec16e02b221275b /src/quick/items/qquickevents_p_p.h
parent6ce37a1eed9a41b036872bbbac2a5e73c6cbf9eb (diff)
QQuickWindow: keep a collection of devices which own event instances
That will allow the event instances to hold state, even between events. So now every QQuickWindow has its own set of them, per device. Hopefully that means we won't have any trouble delivering events in parallel in case each window has its own thread. Otherwise maybe it's slightly wasteful in multi-window apps. Change-Id: I766b580e1c177255905cc04b5de7d33ae503c6fd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents_p_p.h')
-rw-r--r--src/quick/items/qquickevents_p_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index b798165861..624c131683 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -435,6 +435,7 @@ public:
int buttonCount() const { return m_buttonCount; }
QString name() const { return m_name; }
qint64 uniqueId() const { return m_uniqueId; }
+ QQuickPointerEvent *pointerEvent() const { return &m_event; }
private:
DeviceType m_deviceType;
@@ -444,6 +445,8 @@ private:
int m_buttonCount;
QString m_name;
qint64 m_uniqueId;
+ // the device-specific event instance which is reused during event delivery
+ mutable QQuickPointerEvent m_event;
Q_DISABLE_COPY(QQuickPointerDevice)
};