diff options
Diffstat (limited to 'tests/auto/declarative/behaviors')
-rw-r--r-- | tests/auto/declarative/behaviors/tst_behaviors.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/auto/declarative/behaviors/tst_behaviors.cpp b/tests/auto/declarative/behaviors/tst_behaviors.cpp index 073d5bc..aea5604 100644 --- a/tests/auto/declarative/behaviors/tst_behaviors.cpp +++ b/tests/auto/declarative/behaviors/tst_behaviors.cpp @@ -42,8 +42,8 @@ #include <QtDeclarative/qmlengine.h> #include <QtDeclarative/qmlcomponent.h> #include <QtDeclarative/qmlview.h> -#include <QtDeclarative/qfxrect.h> -#include <QtDeclarative/QmlNumberAnimation> +#include <private/qmlgraphicsrect_p.h> +#include <private/qmlanimation_p.h> class tst_behaviors : public QObject { @@ -66,12 +66,12 @@ void tst_behaviors::simpleBehavior() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/simple.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setState("moved"); QTest::qWait(100); - qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x(); + qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x(); QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered } @@ -79,12 +79,12 @@ void tst_behaviors::scriptTriggered() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/scripttrigger.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setColor(QColor("red")); QTest::qWait(100); - qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x(); + qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x(); QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered } @@ -92,10 +92,10 @@ void tst_behaviors::cppTriggered() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/cpptrigger.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); - QFxRect *innerRect = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect")); + QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect")); QVERIFY(innerRect); innerRect->setProperty("x", 200); @@ -108,7 +108,7 @@ void tst_behaviors::loop() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/loop.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); //don't crash @@ -119,12 +119,12 @@ void tst_behaviors::colorBehavior() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/color.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setState("red"); QTest::qWait(100); - QColor color = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->color(); + QColor color = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->color(); QVERIFY(color != QColor("red") && color != QColor("green")); //i.e. the behavior has been triggered } @@ -132,12 +132,12 @@ void tst_behaviors::replaceBinding() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/binding.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setState("moved"); QTest::qWait(100); - QFxRect *innerRect = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect")); + QmlGraphicsRect *innerRect = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect")); QVERIFY(innerRect); qreal x = innerRect->x(); QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered @@ -167,24 +167,24 @@ void tst_behaviors::group() { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/groupProperty.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setState("moved"); QTest::qWait(100); - qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x(); + qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x(); QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered } { QmlEngine engine; QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/groupProperty2.qml")); - QFxRect *rect = qobject_cast<QFxRect*>(c.create()); + QmlGraphicsRect *rect = qobject_cast<QmlGraphicsRect*>(c.create()); QVERIFY(rect); rect->setState("moved"); QTest::qWait(100); - qreal x = qobject_cast<QFxRect*>(rect->findChild<QFxRect*>("MyRect"))->x(); + qreal x = qobject_cast<QmlGraphicsRect*>(rect->findChild<QmlGraphicsRect*>("MyRect"))->x(); QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered } } |