diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-14 08:29:21 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-14 08:29:21 (GMT) |
commit | 8fb224b87b4508d259f8348920caadc6a75c45e2 (patch) | |
tree | 76a9642f5c92e299c9c41031c52bd86730b6037f /src/declarative/graphicsitems | |
parent | f1021208218aa1d7eda58fed2742ea6a99266153 (diff) | |
parent | 3bc6f8d8dd630cd0298e27fc4b7430d2bf73a232 (diff) | |
download | Qt-8fb224b87b4508d259f8348920caadc6a75c45e2.zip Qt-8fb224b87b4508d259f8348920caadc6a75c45e2.tar.gz Qt-8fb224b87b4508d259f8348920caadc6a75c45e2.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Don't leak ScopeChainNode's
Rename 'plugins\qmldebugging' (work around qmake issues)
Correct the "module not installed" error handling
Flickable uses the flick velocity to determine whether to retain grab
Make addImportPath() work for windows paths starting with lower case
Report any exceptions occurring in WorkerScript javascript code
MouseArea docs - link to onCanceled() from onReleased()
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeflickable.cpp | 7 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativemousearea.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index a12a5ed..8b2d094 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -53,6 +53,10 @@ QT_BEGIN_NAMESPACE // before we perform a flick. static const int FlickThreshold = 20; +// RetainGrabVelocity is the maxmimum instantaneous velocity that +// will ensure the Flickable retains the grab on consecutive flicks. +static const int RetainGrabVelocity = 15; + QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent) : QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.) , m_yPosition(0.), m_heightRatio(0.) @@ -672,7 +676,8 @@ void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction) void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) { Q_Q(QDeclarativeFlickable); - if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10)) + if (interactive && timeline.isActive() + && (qAbs(hData.smoothVelocity.value()) > RetainGrabVelocity || qAbs(vData.smoothVelocity.value()) > RetainGrabVelocity)) stealMouse = true; // If we've been flicked then steal the click. else stealMouse = false; diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index ffbae3f..5b73a29 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -314,6 +314,8 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() position of the release of the click, and whether the click was held. The \e accepted property of the MouseEvent parameter is ignored in this handler. + + \sa onCanceled() */ /*! |