summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-21 05:41:43 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-21 06:11:48 (GMT)
commitccd9efbe06825f25eebefbfa72bc065d15d190ad (patch)
tree87fdf5d554f7251b09ccd11faa2f69f17db23891 /src/declarative/graphicsitems
parent6abe7f1ef6021a1174d88d1a2811c58241a96707 (diff)
downloadQt-ccd9efbe06825f25eebefbfa72bc065d15d190ad.zip
Qt-ccd9efbe06825f25eebefbfa72bc065d15d190ad.tar.gz
Qt-ccd9efbe06825f25eebefbfa72bc065d15d190ad.tar.bz2
Emit released and hoveredChanged in MouseArea when a UngrabMouse is received
The unbgrab mouse happens when the mouse area is inside a flickable and the flickables takes control over the mouse handling. In this case, the UngrabMouse will behave similarly to a MouseRelease, emitting released, pressedChanged and hoveredChanged. Visual autotest added to mousearea in qmlvisual. Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 969c60e..126d041 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -564,8 +564,10 @@ bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
// state
d->pressed = false;
setKeepMouseGrab(false);
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, false);
+ emit released(&me);
emit pressedChanged();
- //emit hoveredChanged();
+ setHovered(false);
}
}
return rv;