diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-11 03:34:46 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-11 03:34:46 (GMT) |
commit | 7e71c79bd6dcc1c8608ebb0570b455372f5f7eaf (patch) | |
tree | f6e3bb9da2498b91c6a0224518700fd124ebb266 | |
parent | 7c70691d2867870f415118e5feef2963e882b140 (diff) | |
download | Qt-7e71c79bd6dcc1c8608ebb0570b455372f5f7eaf.zip Qt-7e71c79bd6dcc1c8608ebb0570b455372f5f7eaf.tar.gz Qt-7e71c79bd6dcc1c8608ebb0570b455372f5f7eaf.tar.bz2 |
Fix MouseRegion.enabled
All Qt events are accepted by default. Must be specifically ignored. Normally,
this is done by calling base class in the "ignore" case.
-rw-r--r-- | src/declarative/canvas/qsimplecanvasitem.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/declarative/canvas/qsimplecanvasitem.cpp b/src/declarative/canvas/qsimplecanvasitem.cpp index ba33a41..c8c949a 100644 --- a/src/declarative/canvas/qsimplecanvasitem.cpp +++ b/src/declarative/canvas/qsimplecanvasitem.cpp @@ -104,48 +104,58 @@ bool QSimpleCanvasItem::mouseFilter(QGraphicsSceneMouseEvent *) return false; } -void QSimpleCanvasItem::mousePressEvent(QGraphicsSceneMouseEvent *) +void QSimpleCanvasItem::mousePressEvent(QGraphicsSceneMouseEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *) +void QSimpleCanvasItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) +void QSimpleCanvasItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::mouseMoveEvent(QGraphicsSceneMouseEvent *) +void QSimpleCanvasItem::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::hoverEnterEvent(QGraphicsSceneHoverEvent *) +void QSimpleCanvasItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) +void QSimpleCanvasItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) { + e->ignore(); } void QSimpleCanvasItem::mouseUngrabEvent() { } -void QSimpleCanvasItem::keyPressEvent(QKeyEvent *) +void QSimpleCanvasItem::keyPressEvent(QKeyEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::keyReleaseEvent(QKeyEvent *) +void QSimpleCanvasItem::keyReleaseEvent(QKeyEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::focusOutEvent(QFocusEvent *) +void QSimpleCanvasItem::focusOutEvent(QFocusEvent *e) { + e->ignore(); } -void QSimpleCanvasItem::focusInEvent(QFocusEvent *) +void QSimpleCanvasItem::focusInEvent(QFocusEvent *e) { + e->ignore(); } void QSimpleCanvasItem::activePanelInEvent() @@ -156,8 +166,9 @@ void QSimpleCanvasItem::activePanelOutEvent() { } -void QSimpleCanvasItem::inputMethodEvent(QInputMethodEvent *) +void QSimpleCanvasItem::inputMethodEvent(QInputMethodEvent *e) { + e->ignore(); } QVariant QSimpleCanvasItem::inputMethodQuery(Qt::InputMethodQuery) const |