diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-05-13 14:42:48 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-05-13 14:42:48 (GMT) |
commit | b3cf8db56491642443f4eea86a12e3d0eb869217 (patch) | |
tree | 1ba2ff457fc790fb57b786accc7c278de5362f5b /src/declarative/graphicsitems/qdeclarativegridview.cpp | |
parent | 29559bb440529e4afd766cad61578947e86fa948 (diff) | |
parent | 1fdcceb52bf0b9a3f34c705eb233ac251fbb251a (diff) | |
download | Qt-b3cf8db56491642443f4eea86a12e3d0eb869217.zip Qt-b3cf8db56491642443f4eea86a12e3d0eb869217.tar.gz Qt-b3cf8db56491642443f4eea86a12e3d0eb869217.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 396acd0..fe78c84 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -347,8 +347,7 @@ public: void QDeclarativeGridViewPrivate::init() { Q_Q(QDeclarativeGridView); - QObject::connect(q, SIGNAL(movingHorizontallyChanged()), q, SLOT(animStopped())); - QObject::connect(q, SIGNAL(movingVerticallyChanged()), q, SLOT(animStopped())); + QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped())); q->setFlag(QGraphicsItem::ItemIsFocusScope); q->setFlickableDirection(QDeclarativeFlickable::VerticalFlick); addItemChangeListener(this, Geometry); @@ -878,13 +877,15 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); if (!flickingHorizontally && q->xflick()) { flickingHorizontally = true; - emit q->flickingChanged(); // deprecated + emit q->flickingChanged(); emit q->flickingHorizontallyChanged(); + emit q->flickStarted(); } if (!flickingVertically && q->yflick()) { flickingVertically = true; - emit q->flickingChanged(); // deprecated + emit q->flickingChanged(); emit q->flickingVerticallyChanged(); + emit q->flickStarted(); } } else { timeline.reset(data.move); @@ -2311,13 +2312,9 @@ void QDeclarativeGridView::destroyingItem(QDeclarativeItem *item) void QDeclarativeGridView::animStopped() { Q_D(QDeclarativeGridView); - if ((!d->movingVertically && d->flow == QDeclarativeGridView::LeftToRight) - || (!d->movingHorizontally && d->flow == QDeclarativeGridView::TopToBottom)) - { - d->bufferMode = QDeclarativeGridViewPrivate::NoBuffer; - if (d->haveHighlightRange && d->highlightRange == QDeclarativeGridView::StrictlyEnforceRange) - d->updateHighlight(); - } + d->bufferMode = QDeclarativeGridViewPrivate::NoBuffer; + if (d->haveHighlightRange && d->highlightRange == QDeclarativeGridView::StrictlyEnforceRange) + d->updateHighlight(); } void QDeclarativeGridView::refill() |