diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-25 02:09:59 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-25 02:12:54 (GMT) |
commit | a20828a110ad35a7a98a6234ca0013203d9f8b61 (patch) | |
tree | 9bb92d7cca2339465b79a6070584d2dca6e81c15 /src/declarative/util/qdeclarativeanimation.cpp | |
parent | 4d078ed668541a4051f91b5c120b8cb0534129bd (diff) | |
download | Qt-a20828a110ad35a7a98a6234ca0013203d9f8b61.zip Qt-a20828a110ad35a7a98a6234ca0013203d9f8b61.tar.gz Qt-a20828a110ad35a7a98a6234ca0013203d9f8b61.tar.bz2 |
Qt.Infinite -> Animation.Infinite
Too misleading to have on the Qt object, as it only means infinite
for animation loops.
Diffstat (limited to 'src/declarative/util/qdeclarativeanimation.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 81ab3d3..bad142c 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -309,7 +309,7 @@ void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f) By default, \c loops is 1: the animation will play through once and then stop. - If set to Qt.Infinite, the animation will continuously repeat until it is explicitly + If set to Animation.Infinite, the animation will continuously repeat until it is explicitly stopped - either by setting the \c running property to false, or by calling the \c stop() method. @@ -319,7 +319,7 @@ void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f) Rectangle { width: 100; height: 100; color: "green" RotationAnimation on rotation { - loops: Qt.Infinite + loops: Animation.Infinite from: 0 to: 360 } @@ -335,6 +335,9 @@ int QDeclarativeAbstractAnimation::loops() const void QDeclarativeAbstractAnimation::setLoops(int loops) { Q_D(QDeclarativeAbstractAnimation); + if (loops < 0) + loops = -1; + if (loops == d->loopCount) return; @@ -1598,7 +1601,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int \qml Rectangle { SequentialAnimation on x { - loops: Qt.Infinite + loops: Animation.Infinite PropertyAnimation { to: 50 } PropertyAnimation { to: 0 } } @@ -2007,7 +2010,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) id: theRect width: 100; height: 100 color: Qt.rgba(0,0,1) - NumberAnimation on x { to: 500; loops: Qt.Infinite } //animate theRect's x property + NumberAnimation on x { to: 500; loops: Animation.Infinite } //animate theRect's x property Behavior on y { NumberAnimation {} } //animate theRect's y property } \endqml |