diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-11-23 03:44:39 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-11-23 03:44:39 (GMT) |
commit | 52068f57f9c32098a90cc217730a530f85590f65 (patch) | |
tree | 1ad54491b7bf37b019b1cdf8405be8037c9c213c /src/3rdparty | |
parent | 83ececf2e036bd5bf8100808aed8ce469f13f593 (diff) | |
download | Qt-52068f57f9c32098a90cc217730a530f85590f65.zip Qt-52068f57f9c32098a90cc217730a530f85590f65.tar.gz Qt-52068f57f9c32098a90cc217730a530f85590f65.tar.bz2 |
Ensure WebView press delay timer is cancelled when grab is taken.
Flickable steals the grab, but the timer was not stopped and the
keepGrab flag is set and the mouse grabbed. This means that the WebView
now has the grab and subsequent clicks on another element are ignored.
Task-number: QTBUG-15529
Reviewed-by: Joona Petrell
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 10 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index e4f70de..7a8aae7 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -141,6 +141,16 @@ void GraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* event) QGraphicsWebView::mouseMoveEvent(event); } +bool GraphicsWebView::sceneEvent(QEvent *event) +{ + bool rv = QGraphicsWebView::sceneEvent(event); + if (event->type() == QEvent::UngrabMouse) { + pressTimer.stop(); + parent->setKeepMouseGrab(false); + } + return rv; +} + /*! \qmlclass WebView QDeclarativeWebView \ingroup qml-view-elements diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h index b2055bf..ca15a1e 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h @@ -70,6 +70,8 @@ protected: void mouseMoveEvent(QGraphicsSceneMouseEvent* event); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event); void timerEvent(QTimerEvent* event); + bool sceneEvent(QEvent *event); + Q_SIGNALS: void doubleClick(int clickX, int clickY); private: |