summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/flickr/common/Loading.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/Loading.qml2
-rw-r--r--doc/src/declarative/animation.qdoc2
-rw-r--r--examples/declarative/animations/color-animation.qml10
-rw-r--r--examples/declarative/animations/property-animation.qml2
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml4
-rw-r--r--examples/declarative/effects/effects.qml4
-rw-r--r--examples/declarative/fillmode/fillmode.qml2
-rw-r--r--examples/declarative/fonts/banner.qml2
-rw-r--r--examples/declarative/fonts/hello.qml4
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml2
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml2
-rw-r--r--examples/declarative/progressbar/progressbars.qml6
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml2
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml2
-rw-r--r--src/declarative/QmlChanges.txt2
-rw-r--r--src/declarative/qml/qdeclarativedom.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp3
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp11
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h3
-rw-r--r--src/declarative/util/qdeclarativespringfollow.cpp2
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp35
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/properties.qml2
-rw-r--r--tests/auto/declarative/visual/animation/loop/loop.qml2
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml4
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/renderControl.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/resolution.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml2
40 files changed, 91 insertions, 55 deletions
diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml
index 87a4ef9..4c41717 100644
--- a/demos/declarative/flickr/common/Loading.qml
+++ b/demos/declarative/flickr/common/Loading.qml
@@ -3,6 +3,6 @@ import Qt 4.6
Image {
id: loading; source: "pics/loading.png"
NumberAnimation on rotation {
- from: 0; to: 360; running: loading.visible == true; loops: Qt.Infinite; duration: 900
+ from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900
}
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml
index fc83766..361659c 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml
@@ -5,5 +5,5 @@ Image {
property bool on: false
source: "images/busy.png"; visible: container.on
- NumberAnimation on rotation { running: container.on; from: 0; to: 360; loops: Qt.Infinite; duration: 1200 }
+ NumberAnimation on rotation { running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200 }
}
diff --git a/demos/declarative/twitter/TwitterCore/Loading.qml b/demos/declarative/twitter/TwitterCore/Loading.qml
index e403b8d..957de0f 100644
--- a/demos/declarative/twitter/TwitterCore/Loading.qml
+++ b/demos/declarative/twitter/TwitterCore/Loading.qml
@@ -3,6 +3,6 @@ import Qt 4.6
Image {
id: loading; source: "images/loading.png"
NumberAnimation on rotation {
- from: 0; to: 360; running: loading.visible == true; loops: Qt.Infinite; duration: 900
+ from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900
}
}
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 00993f0..9969e8f 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -72,7 +72,7 @@ Rectangle {
x: 60-img.width/2
y: 0
SequentialAnimation on y {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
PauseAnimation { duration: 1000 }
NumberAnimation { to: 0; easing.type: "OutQuad"; duration: 1000 }
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
index 5d313c1..d8361ba 100644
--- a/examples/declarative/animations/color-animation.qml
+++ b/examples/declarative/animations/color-animation.qml
@@ -12,7 +12,7 @@ Item {
GradientStop {
position: 0.0
SequentialAnimation on color {
- loops: Qt.Infinite
+ loops: Animation.Infinite
ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
}
@@ -20,7 +20,7 @@ Item {
GradientStop {
position: 1.0
SequentialAnimation on color {
- loops: Qt.Infinite
+ loops: Animation.Infinite
ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
}
@@ -32,7 +32,7 @@ Item {
Item {
width: parent.width; height: 2 * parent.height
transformOrigin: Item.Center
- NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Qt.Infinite }
+ NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
Image {
source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
transformOrigin: Item.Center; rotation: -3 * parent.rotation
@@ -46,7 +46,7 @@ Item {
source: "images/star.png"; angleDeviation: 360; velocity: 0
velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
SequentialAnimation on opacity {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: 0; to: 1; duration: 5000 }
NumberAnimation { from: 1; to: 0; duration: 5000 }
}
@@ -60,7 +60,7 @@ Item {
GradientStop {
position: 0.0
SequentialAnimation on color {
- loops: Qt.Infinite
+ loops: Animation.Infinite
ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
}
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
index d33b55d..401feb5 100644
--- a/examples/declarative/animations/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
@@ -43,7 +43,7 @@ Item {
// Animate the y property. Setting repeat to true makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
- loops: Qt.Infinite
+ loops: Animation.Infinite
// Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
NumberAnimation {
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
index bd0f5fb..f0c3cfc 100644
--- a/examples/declarative/border-image/content/MyBorderImage.qml
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
@@ -18,13 +18,13 @@ Item {
id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
SequentialAnimation on width {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
}
SequentialAnimation on height {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
}
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
index 45246a9..2280a2a 100644
--- a/examples/declarative/effects/effects.qml
+++ b/examples/declarative/effects/effects.qml
@@ -16,7 +16,7 @@ Rectangle {
running: false
from: 0; to: 10
duration: 1000
- loops: Qt.Infinite
+ loops: Animation.Infinite
}
}
@@ -33,7 +33,7 @@ Rectangle {
effect: DropShadow {
blurRadius: 3
offset.x: 3
- NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; loops: Qt.Infinite; }
+ NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; loops: Animation.Infinite; }
}
MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
index effb964..3f2020c 100644
--- a/examples/declarative/fillmode/fillmode.qml
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -5,7 +5,7 @@ Image {
height: 250
source: "face.png"
SequentialAnimation on fillMode {
- loops: Qt.Infinite
+ loops: Animation.Infinite
PropertyAction { value: Image.Stretch }
PropertyAction { target: label; property: "text"; value: "Stretch" }
PauseAnimation { duration: 1000 }
diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml
index bb4fe24..957246f 100644
--- a/examples/declarative/fonts/banner.qml
+++ b/examples/declarative/fonts/banner.qml
@@ -10,7 +10,7 @@ Rectangle {
Row {
y: -screen.height / 4.5
- NumberAnimation on x { from: 0; to: -text.width; duration: 6000; loops: Qt.Infinite }
+ NumberAnimation on x { from: 0; to: -text.width; duration: 6000; loops: Animation.Infinite }
Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
index f703167..e15a0f0 100644
--- a/examples/declarative/fonts/hello.qml
+++ b/examples/declarative/fonts/hello.qml
@@ -10,7 +10,7 @@ Rectangle {
text: "Hello world!"; font.pixelSize: 60
SequentialAnimation on font.letterSpacing {
- loops: Qt.Infinite;
+ loops: Animation.Infinite;
NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 }
ScriptAction { script: {
container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
@@ -18,7 +18,7 @@ Rectangle {
} }
}
SequentialAnimation on opacity {
- loops: Qt.Infinite;
+ loops: Animation.Infinite;
NumberAnimation { from: 1; to: 0; duration: 2600 }
PauseAnimation { duration: 400 }
}
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
index 8ef4a52..cbf1f3b 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -18,7 +18,7 @@ Item {
ScriptAction { script: page.clicked() }
PauseAnimation { duration: repeatdelay }
SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
ScriptAction { script: page.clicked() }
PauseAnimation { duration: repeatperiod }
}
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
index 75302a3..c13b879 100644
--- a/examples/declarative/parallax/qml/Smiley.qml
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -25,7 +25,7 @@ Item {
// Animate the y property. Setting repeat to true makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
- loops: Qt.Infinite
+ loops: Animation.Infinite
// Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
NumberAnimation {
diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/progressbar/progressbars.qml
index ced3ccd..c8022b0 100644
--- a/examples/declarative/progressbar/progressbars.qml
+++ b/examples/declarative/progressbar/progressbars.qml
@@ -14,9 +14,9 @@ Rectangle {
ProgressBar {
property int r: Math.floor(Math.random() * 5000 + 1000)
width: main.width - 20
- NumberAnimation on value { duration: r; from: 0; to: 100; loops: Qt.Infinite }
- ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Qt.Infinite }
- ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Qt.Infinite }
+ NumberAnimation on value { duration: r; from: 0; to: 100; loops: Animation.Infinite }
+ ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Animation.Infinite }
+ ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Animation.Infinite }
}
}
}
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index 138d587..fcb285d 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -21,7 +21,7 @@ Rectangle {
// Move the ball to the right and back to the left repeatedly
SequentialAnimation on x {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { to: page.width - 40; duration: 2000 }
ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "left" }
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml
index b0f568f..62c0ce2 100644
--- a/examples/declarative/webview/content/SpinSquare.qml
+++ b/examples/declarative/webview/content/SpinSquare.qml
@@ -18,7 +18,7 @@ Item {
NumberAnimation on rotation {
from: 0
to: 360
- loops: Qt.Infinite
+ loops: Animation.Infinite
duration: root.period
}
}
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index b85cfb6..2a35dda 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -12,7 +12,7 @@ Using Particles now requires "import Qt.labs.particles 1.0"
AnchorAnimation must now be used to animate anchor changes (and not NumberAnimation)
Removed ParentAction (use ParentAnimation instead)
ScriptAction: renamed stateChangeScriptName -> scriptName
-Animation: replace repeat with loops (loops: Qt.Infinite gives the old repeat behavior)
+Animation: replace repeat with loops (loops: Animation.Infinite gives the old repeat behavior)
C++ API
-------
diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp
index e374a93..366750e 100644
--- a/src/declarative/qml/qdeclarativedom.cpp
+++ b/src/declarative/qml/qdeclarativedom.cpp
@@ -1107,7 +1107,7 @@ Rectangle {
x: NumberAnimation {
from: 0
to: 100
- loops: Qt.Infinite
+ loops: Animation.Infinite
}
}
\endqml
@@ -1155,7 +1155,7 @@ Rectangle {
x: NumberAnimation {
from: 0
to: 100
- loops: Qt.Infinite
+ loops: Animation.Infinite
}
}
\endqml
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index b4362ce..ddbe433 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -218,9 +218,6 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
// XXX When the above a done some better way, that way should also be
// XXX used to add Qt.Sound class.
- //for animations that loop forever
- qtObject.setProperty(QLatin1String("Infinite"), -1);
-
//types
qtObject.setProperty(QLatin1String("rgba"), newFunction(QDeclarativeEnginePrivate::rgba, 4));
qtObject.setProperty(QLatin1String("hsla"), newFunction(QDeclarativeEnginePrivate::hsla, 4));
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
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 2e5b87c..816520e 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -70,6 +70,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public Q
Q_INTERFACES(QDeclarativeParserStatus)
Q_INTERFACES(QDeclarativePropertyValueSource)
+ Q_ENUMS(Loops)
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged)
@@ -80,6 +81,8 @@ public:
QDeclarativeAbstractAnimation(QObject *parent=0);
virtual ~QDeclarativeAbstractAnimation();
+ enum Loops { Infinite = -2 };
+
bool isRunning() const;
void setRunning(bool);
bool isPaused() const;
diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp
index ca88b24..76d7c98 100644
--- a/src/declarative/util/qdeclarativespringfollow.cpp
+++ b/src/declarative/util/qdeclarativespringfollow.cpp
@@ -224,7 +224,7 @@ void QDeclarativeSpringFollowPrivate::stop()
color: "#00ff00"
y: 200 // initial value
SequentialAnimation on y {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation {
to: 200
easing.type: "OutBounce"
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index 46c9b73..d79c6ba 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -71,6 +71,38 @@
#include "qdeclarativexmllistmodel_p.h"
#endif
+template<typename T>
+int qmlRegisterTypeEnums(const char *qmlName)
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ 0, 0,
+
+ "Qt", 4, 6, qmlName, &T::staticMetaObject,
+
+ QDeclarativePrivate::attachedPropertiesFunc<T>(),
+ QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ 0, 0,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
void QDeclarativeUtilModule::defineModule()
{
qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,6,"AnchorAnimation");
@@ -107,9 +139,10 @@ void QDeclarativeUtilModule::defineModule()
#endif
qmlRegisterType<QDeclarativeAnchors>();
- qmlRegisterType<QDeclarativeAbstractAnimation>();
qmlRegisterType<QDeclarativeStateOperation>();
+ qmlRegisterTypeEnums<QDeclarativeAbstractAnimation>("Animation");
+
qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,6, "ListModel", "QDeclarativeListModel",
new QDeclarativeListModelParser);
qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 6, "PropertyChanges", "QDeclarativePropertyChanges",
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
index ed43082..d6bfe45 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
@@ -10,7 +10,7 @@ Rectangle {
width: 100; height: 100
color: Qt.rgba(1,0,0)
Behavior on x {
- NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; loops: Qt.Infinite}
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; loops: Animation.Infinite}
}
}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
index da2e8d0..5ce758d 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
@@ -66,4 +66,4 @@ Rectangle {
]
}
- \ No newline at end of file
+
diff --git a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
index bf4dd85..5f97408 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
@@ -7,4 +7,4 @@ Item {
Item {
objectName: "parentItem"
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
index a41f003..09877ac 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
@@ -68,4 +68,4 @@ Rectangle {
]
}
- \ No newline at end of file
+
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
index 550ce8d..8c9f88e 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
@@ -8,4 +8,4 @@ Row {
text: "I'm item " + index
}
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/visual/animation/loop/loop.qml b/tests/auto/declarative/visual/animation/loop/loop.qml
index 36f3ece..927e103 100644
--- a/tests/auto/declarative/visual/animation/loop/loop.qml
+++ b/tests/auto/declarative/visual/animation/loop/loop.qml
@@ -14,7 +14,7 @@ Rectangle {
back to 100, jumps to 200, and so on.
*/
x: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { to: 100; duration: 1000 }
NumberAnimation { from: 200; to: 400; duration: 1000 }
}
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
index 0429171..4562aa7 100644
--- a/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
@@ -11,7 +11,7 @@ Rectangle {
x: 60-width/2
y: 200-height
y: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation {
to: 0; duration: 500
easing.type: "InOutQuad"
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
index 2beb1dd..c3006d5 100644
--- a/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
@@ -19,13 +19,13 @@ Item {
id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
width: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
}
height: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
}
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
index c9e65fe..99a9973 100644
--- a/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
@@ -7,7 +7,7 @@ Rectangle {
id: rect
width: 50; height: 20; y: 30; color: "black"
x: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: 50; to: 700; duration: 2000 }
NumberAnimation { from: 700; to: 50; duration: 2000 }
}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
index 4809a9c..e9c94c7 100644
--- a/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
@@ -8,7 +8,7 @@ Rectangle {
color: "#00ff00"
y: 200; width: 60; height: 20
y: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation {
to: 20; duration: 500
easing.type: "InOutQuad"
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
index 7b1042b..ecd9470 100644
--- a/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
@@ -5,7 +5,7 @@ Rectangle {
height: 100
Text {
- width: NumberAnimation { from: 500; to: 0; loops: Qt.Infinite; duration: 5000 }
+ width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 }
elide: Text.ElideRight
text: 'Here is some very long text that we should truncate when sizing window'
}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
index 21763b2..ab6e1533 100644
--- a/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
@@ -11,7 +11,7 @@ Rectangle {
anchors.centerIn: parent
Text {
id: myText
- width: NumberAnimation { from: 500; to: 0; loops: Qt.Infinite; duration: 1000 }
+ width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 1000 }
elide: "ElideRight"
text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
index f50aec6..5516fc9 100644
--- a/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
@@ -10,7 +10,7 @@ import Qt 4.6
Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
opacity: 1
- opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Qt.Infinite;
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Animation.Infinite;
NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
index 7b981ac..199f71f 100644
--- a/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
@@ -10,7 +10,7 @@ import Qt 4.6
Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
opacity: 1
- opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Qt.Infinite;
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Animation.Infinite;
NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
}
diff --git a/tests/auto/declarative/visual/webview/zooming/renderControl.qml b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
index 406e156..bcbcf5c 100644
--- a/tests/auto/declarative/visual/webview/zooming/renderControl.qml
+++ b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
@@ -10,7 +10,7 @@ Rectangle {
width: 400
url: "renderControl.html"
x: SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: 100; to: 0; duration: 200 }
PropertyAction { target: webview; property: "renderingEnabled"; value: false }
NumberAnimation { from: 0; to: -100; duration: 200 }
diff --git a/tests/auto/declarative/visual/webview/zooming/resolution.qml b/tests/auto/declarative/visual/webview/zooming/resolution.qml
index 57cc17b..bce6744 100644
--- a/tests/auto/declarative/visual/webview/zooming/resolution.qml
+++ b/tests/auto/declarative/visual/webview/zooming/resolution.qml
@@ -8,7 +8,7 @@ WebView {
url: "resolution.html"
zoomFactor:
SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: 1; to: 0.25; duration: 2000 }
NumberAnimation { from: 0.25; to: 1; duration: 2000 }
NumberAnimation { from: 1; to: 5; duration: 2000 }
diff --git a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
index f4c8aaa..6d51c8a 100644
--- a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
+++ b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
@@ -8,7 +8,7 @@ WebView {
settings.zoomTextOnly: true
zoomFactor:
SequentialAnimation {
- loops: Qt.Infinite
+ loops: Animation.Infinite
NumberAnimation { from: 2; to: 0.25; duration: 1000 }
NumberAnimation { from: 0.25; to: 2; duration: 1000 }
}