summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-07-08 15:49:23 (GMT)
committermae <qt-info@nokia.com>2010-07-08 16:34:25 (GMT)
commitb22a5e13003ff9f23b075284a1a1e0a6b0e46250 (patch)
tree178f70df43aa34851efd82b1286a472c3f1fd500 /tests/auto/declarative
parentd5d16b3d3304774df11f40df0206d90ed5f840de (diff)
downloadQt-b22a5e13003ff9f23b075284a1a1e0a6b0e46250.zip
Qt-b22a5e13003ff9f23b075284a1a1e0a6b0e46250.tar.gz
Qt-b22a5e13003ff9f23b075284a1a1e0a6b0e46250.tar.bz2
Follow -> Behavior
Replace the usages of Follows with Behaviors, update docs.
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml (renamed from tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml)5
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml (renamed from tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml)4
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro (renamed from tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro)2
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp (renamed from tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp)44
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml4
6 files changed, 29 insertions, 34 deletions
diff --git a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml
new file mode 100644
index 0000000..07587bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml
@@ -0,0 +1,4 @@
+import Qt 4.7
+
+SpringAnimation {
+}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml
index 0fa4aa9..562f44a 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
+++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml
@@ -1,8 +1,9 @@
import Qt 4.7
-SpringFollow {
+SpringAnimation {
to: 1.44; velocity: 0.9
spring: 1.0; damping: 0.5
epsilon: 0.25; modulus: 360.0
- mass: 2.0; enabled: false
+ mass: 2.0;
+ running: true;
}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml
index 31a740a..9f70bf4 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
+++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml
@@ -1,8 +1,8 @@
import Qt 4.7
-SpringFollow {
+SpringAnimation {
to: 1.44; velocity: 0.9
spring: 1.0; damping: 0.5
epsilon: 0.25; modulus: 360.0
- mass: 2.0; enabled: true
+ mass: 2.0; running: false
}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
index 1c17ba0..213b262 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
+++ b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
@@ -2,7 +2,7 @@ load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
macx:CONFIG -= app_bundle
-SOURCES += tst_qdeclarativespringfollow.cpp
+SOURCES += tst_qdeclarativespringanimation.cpp
symbian: {
importFiles.sources = data
diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
index e0e2892..4b17a47 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
+++ b/tests/auto/declarative/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
@@ -41,7 +41,7 @@
#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
-#include <private/qdeclarativespringfollow_p.h>
+#include <private/qdeclarativespringanimation_p.h>
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
@@ -50,11 +50,11 @@
#define SRCDIR "."
#endif
-class tst_qdeclarativespringfollow : public QObject
+class tst_qdeclarativespringanimation : public QObject
{
Q_OBJECT
public:
- tst_qdeclarativespringfollow();
+ tst_qdeclarativespringanimation();
private slots:
void defaultValues();
@@ -65,15 +65,15 @@ private:
QDeclarativeEngine engine;
};
-tst_qdeclarativespringfollow::tst_qdeclarativespringfollow()
+tst_qdeclarativespringanimation::tst_qdeclarativespringanimation()
{
}
-void tst_qdeclarativespringfollow::defaultValues()
+void tst_qdeclarativespringanimation::defaultValues()
{
QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow1.qml"));
- QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springanimation1.qml"));
+ QDeclarativeSpringAnimation *obj = qobject_cast<QDeclarativeSpringAnimation*>(c.create());
QVERIFY(obj != 0);
@@ -83,19 +83,17 @@ void tst_qdeclarativespringfollow::defaultValues()
QCOMPARE(obj->damping(), 0.);
QCOMPARE(obj->epsilon(), 0.01);
QCOMPARE(obj->modulus(), 0.);
- QCOMPARE(obj->value(), 0.);
QCOMPARE(obj->mass(), 1.);
- QCOMPARE(obj->enabled(), true);
- QCOMPARE(obj->inSync(), true);
+ QCOMPARE(obj->isRunning(), false);
delete obj;
}
-void tst_qdeclarativespringfollow::values()
+void tst_qdeclarativespringanimation::values()
{
QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow2.qml"));
- QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springanimation2.qml"));
+ QDeclarativeSpringAnimation *obj = qobject_cast<QDeclarativeSpringAnimation*>(c.create());
QVERIFY(obj != 0);
@@ -106,19 +104,18 @@ void tst_qdeclarativespringfollow::values()
QCOMPARE(obj->epsilon(), 0.25);
QCOMPARE(obj->modulus(), 360.0);
QCOMPARE(obj->mass(), 2.0);
- QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->isRunning(), true);
- QTRY_COMPARE(obj->value(), 1.44);
- QTRY_COMPARE(obj->inSync(), true);
+ QTRY_COMPARE(obj->isRunning(), false);
delete obj;
}
-void tst_qdeclarativespringfollow::disabled()
+void tst_qdeclarativespringanimation::disabled()
{
QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow3.qml"));
- QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springanimation3.qml"));
+ QDeclarativeSpringAnimation *obj = qobject_cast<QDeclarativeSpringAnimation*>(c.create());
QVERIFY(obj != 0);
@@ -129,14 +126,11 @@ void tst_qdeclarativespringfollow::disabled()
QCOMPARE(obj->epsilon(), 0.25);
QCOMPARE(obj->modulus(), 360.0);
QCOMPARE(obj->mass(), 2.0);
- QCOMPARE(obj->enabled(), false);
-
- QCOMPARE(obj->value(), 0.0);
- QCOMPARE(obj->inSync(), false);
+ QCOMPARE(obj->isRunning(), false);
delete obj;
}
-QTEST_MAIN(tst_qdeclarativespringfollow)
+QTEST_MAIN(tst_qdeclarativespringanimation)
-#include "tst_qdeclarativespringfollow.moc"
+#include "tst_qdeclarativespringanimation.moc"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
deleted file mode 100644
index 8528cfa..0000000
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
+++ /dev/null
@@ -1,4 +0,0 @@
-import Qt 4.7
-
-SpringFollow {
-}