diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-06-11 01:14:28 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-06-11 01:14:28 (GMT) |
commit | f79b9634df97b55c1060d6ecc854df231d850cea (patch) | |
tree | 0755a74ebbc0bddc2bafee77d495903c3f1fd1a0 /src | |
parent | 779b07d29e390bac21c31b77f97e0316e6c26454 (diff) | |
parent | 81fba1a0ed8dda1b0dfc1051cbcca751c4017648 (diff) | |
download | Qt-f79b9634df97b55c1060d6ecc854df231d850cea.zip Qt-f79b9634df97b55c1060d6ecc854df231d850cea.tar.gz Qt-f79b9634df97b55c1060d6ecc854df231d850cea.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 16 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 16 |
2 files changed, 12 insertions, 20 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ed1d271..da01eb5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -897,12 +897,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); if (viewPos != position()) { - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-viewPos); - q->viewportMoved(); - } + else + timeline.set(data.move, -viewPos); } vTime = timeline.time(); } @@ -911,12 +909,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m qreal dist = qAbs(data.move.value() - pos); if (dist > 0) { timeline.reset(data.move); - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(pos); - q->viewportMoved(); - } + else + timeline.set(data.move, pos); vTime = timeline.time(); } } else { diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 3f2b4ce..4848008 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1144,12 +1144,10 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); if (viewPos != position()) { - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-viewPos); - q->viewportMoved(); - } + else + timeline.set(data.move, -viewPos); } vTime = timeline.time(); } @@ -1159,12 +1157,10 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m qreal dist = qAbs(data.move + pos); if (dist > 0) { timeline.reset(data.move); - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-pos); - q->viewportMoved(); - } + else + timeline.set(data.move, -pos); vTime = timeline.time(); } } |