diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-08 10:50:52 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-08 10:52:26 +0200 |
commit | 86699cbccaa044adfd36a14453de8e5c0cefc226 (patch) | |
tree | ea5662ef8746842a765612f45a9f48f25b9c5d6a /src/quick/items/qquickitem.cpp | |
parent | 2bcfb322df727abf96022830077d4ae8b30f644d (diff) | |
parent | 10095542d16fc9f5b2c585abf72fe00be9debff3 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
src/3rdparty/masm/yarr/YarrJIT.h
src/quick/items/qquickwindow.cpp
Change-Id: I551404e1558d56c0b0626346ad1c86406bff0ec7
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index f7e7a1b773..eba3842c10 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3919,6 +3919,16 @@ void QQuickItemPrivate::addItemChangeListener(QQuickItemChangeListener *listener changeListeners.append(ChangeListener(listener, types)); } +void QQuickItemPrivate::updateOrAddItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types) +{ + const ChangeListener changeListener(listener, types); + const int index = changeListeners.indexOf(changeListener); + if (index > -1) + changeListeners[index].types = changeListener.types; + else + changeListeners.append(changeListener); +} + void QQuickItemPrivate::removeItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types) { ChangeListener change(listener, types); @@ -3953,6 +3963,8 @@ void QQuickItemPrivate::updateOrRemoveGeometryChangeListener(QQuickItemChangeLis This event handler can be reimplemented in a subclass to receive key press events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::keyPressEvent(QKeyEvent *event) { @@ -3963,6 +3975,8 @@ void QQuickItem::keyPressEvent(QKeyEvent *event) This event handler can be reimplemented in a subclass to receive key release events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::keyReleaseEvent(QKeyEvent *event) { @@ -3974,6 +3988,8 @@ void QQuickItem::keyReleaseEvent(QKeyEvent *event) This event handler can be reimplemented in a subclass to receive input method events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::inputMethodEvent(QInputMethodEvent *event) { @@ -3985,6 +4001,11 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event) This event handler can be reimplemented in a subclass to receive focus-in events for an item. The event information is provided by the \c event parameter. + + \input item.qdocinc accepting-events + + If you do reimplement this function, you should call the base class + implementation. */ void QQuickItem::focusInEvent(QFocusEvent * /*event*/) { @@ -4002,6 +4023,8 @@ void QQuickItem::focusInEvent(QFocusEvent * /*event*/) This event handler can be reimplemented in a subclass to receive focus-out events for an item. The event information is provided by the \c event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::focusOutEvent(QFocusEvent * /*event*/) { @@ -4011,6 +4034,8 @@ void QQuickItem::focusOutEvent(QFocusEvent * /*event*/) This event handler can be reimplemented in a subclass to receive mouse press events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::mousePressEvent(QMouseEvent *event) { @@ -4021,6 +4046,8 @@ void QQuickItem::mousePressEvent(QMouseEvent *event) This event handler can be reimplemented in a subclass to receive mouse move events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::mouseMoveEvent(QMouseEvent *event) { @@ -4031,6 +4058,8 @@ void QQuickItem::mouseMoveEvent(QMouseEvent *event) This event handler can be reimplemented in a subclass to receive mouse release events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::mouseReleaseEvent(QMouseEvent *event) { @@ -4041,6 +4070,8 @@ void QQuickItem::mouseReleaseEvent(QMouseEvent *event) This event handler can be reimplemented in a subclass to receive mouse double-click events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::mouseDoubleClickEvent(QMouseEvent *) { @@ -4050,7 +4081,7 @@ void QQuickItem::mouseDoubleClickEvent(QMouseEvent *) This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item. - \sa ungrabMouse() + \input item.qdocinc accepting-events */ void QQuickItem::mouseUngrabEvent() { @@ -4060,6 +4091,8 @@ void QQuickItem::mouseUngrabEvent() /*! This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item. + + \input item.qdocinc accepting-events */ void QQuickItem::touchUngrabEvent() { @@ -4071,6 +4104,8 @@ void QQuickItem::touchUngrabEvent() This event handler can be reimplemented in a subclass to receive wheel events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::wheelEvent(QWheelEvent *event) { @@ -4082,6 +4117,8 @@ void QQuickItem::wheelEvent(QWheelEvent *event) This event handler can be reimplemented in a subclass to receive touch events for an item. The event information is provided by the \a event parameter. + + \input item.qdocinc accepting-events */ void QQuickItem::touchEvent(QTouchEvent *event) { @@ -4094,6 +4131,8 @@ void QQuickItem::touchEvent(QTouchEvent *event) \a event parameter. Hover events are only provided if acceptHoverEvents() is true. + + \input item.qdocinc accepting-events */ void QQuickItem::hoverEnterEvent(QHoverEvent *event) { @@ -4106,6 +4145,8 @@ void QQuickItem::hoverEnterEvent(QHoverEvent *event) \a event parameter. Hover events are only provided if acceptHoverEvents() is true. + + \input item.qdocinc accepting-events */ void QQuickItem::hoverMoveEvent(QHoverEvent *event) { @@ -4118,6 +4159,8 @@ void QQuickItem::hoverMoveEvent(QHoverEvent *event) \a event parameter. Hover events are only provided if acceptHoverEvents() is true. + + \input item.qdocinc accepting-events */ void QQuickItem::hoverLeaveEvent(QHoverEvent *event) { @@ -4133,6 +4176,8 @@ void QQuickItem::hoverLeaveEvent(QHoverEvent *event) Drag and drop events are only provided if the ItemAcceptsDrops flag has been set for this item. + \input item.qdocinc accepting-events + \sa Drag, {Drag and Drop} */ void QQuickItem::dragEnterEvent(QDragEnterEvent *event) @@ -4148,6 +4193,8 @@ void QQuickItem::dragEnterEvent(QDragEnterEvent *event) Drag and drop events are only provided if the ItemAcceptsDrops flag has been set for this item. + \input item.qdocinc accepting-events + \sa Drag, {Drag and Drop} */ void QQuickItem::dragMoveEvent(QDragMoveEvent *event) @@ -4163,6 +4210,8 @@ void QQuickItem::dragMoveEvent(QDragMoveEvent *event) Drag and drop events are only provided if the ItemAcceptsDrops flag has been set for this item. + \input item.qdocinc accepting-events + \sa Drag, {Drag and Drop} */ void QQuickItem::dragLeaveEvent(QDragLeaveEvent *event) @@ -4178,6 +4227,8 @@ void QQuickItem::dragLeaveEvent(QDragLeaveEvent *event) Drag and drop events are only provided if the ItemAcceptsDrops flag has been set for this item. + \input item.qdocinc accepting-events + \sa Drag, {Drag and Drop} */ void QQuickItem::dropEvent(QDropEvent *event) |