diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-03 16:32:54 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-06 12:45:47 +0000 |
commit | a9b9875acc6155f85558bb27cdb75f2dda5e2b66 (patch) | |
tree | f27f7874e532c570fdd7b751a3c28409721176b8 /src/quick/items/qquickmultipointtoucharea_p.h | |
parent | d046de0ddb7a8d8762821915d3973a1bea9d499c (diff) |
Mark non-notifying properties in event types CONSTANT
Event objects are valid only within the context of a JS callback that
receives the object as a signal parameter, and the object will not
change during the runtime of that callback. It's not true that the
properties will never change, because event objects are pooled and
reused; but the QML is not allowed to keep a reference to an event,
so the property changes during this reuse are not meant to be seen.
QQuickMouseEvent is similar, and its properties were already marked
CONSTANT.
Change-Id: I4985e4a27bf192779629311eb8c6c1f63d22df3e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickmultipointtoucharea_p.h')
-rw-r--r-- | src/quick/items/qquickmultipointtoucharea_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h index f1550b4ac6..634ea1c2e2 100644 --- a/src/quick/items/qquickmultipointtoucharea_p.h +++ b/src/quick/items/qquickmultipointtoucharea_p.h @@ -185,8 +185,8 @@ private: class QQuickGrabGestureEvent : public QObject { Q_OBJECT - Q_PROPERTY(QQmlListProperty<QObject> touchPoints READ touchPoints) - Q_PROPERTY(qreal dragThreshold READ dragThreshold) + Q_PROPERTY(QQmlListProperty<QObject> touchPoints READ touchPoints CONSTANT) + Q_PROPERTY(qreal dragThreshold READ dragThreshold CONSTANT) public: QQuickGrabGestureEvent() : _dragThreshold(QGuiApplication::styleHints()->startDragDistance()) {} |