diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-05-10 14:26:12 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-05-26 14:33:57 +0000 |
commit | 0ac9389dbd7facaa424dc175e5f5dac514630eef (patch) | |
tree | 56caa4249bc42b5fdd842f8ffa27d6a23569b4da /src/quick/items/qquickitem_p.h | |
parent | 8457ca1b3dfb048acdb4426960ad7ee7c8227ed4 (diff) |
QML: re-use event objects across signal emissions.
This change creates a single key/mouse/wheel event for use in signals,
and re-uses that event across emissions. This prevents allocating a new
event (and it's QObjectPrivate data) for every key press / mouse move /
wheel spin.
Change-Id: I395f6ce3ed8588157e4175c8481351b330793fac
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem_p.h')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 854cbd769b..561f922ed7 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -56,6 +56,7 @@ #include "qquickanchors_p.h" #include "qquickanchors_p_p.h" #include "qquickitemchangelistener_p.h" +#include "qquickevents_p_p.h" #include "qquickwindow_p.h" @@ -778,6 +779,7 @@ public: QQuickItem *imeItem; QList<QQuickItem *> targets; QQuickItem *item; + QQuickKeyEvent theKeyEvent; }; class QQuickKeysAttached : public QObject, public QQuickItemKeyFilter |