diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 12:39:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 12:39:11 +0200 |
commit | e137877eaaa3975a6769fd2dd574bd75876fcfa5 (patch) | |
tree | a397bdb1389ea02e6fb7b083e3e149b8a0de50cf /tests/auto/quick/qquickanimations | |
parent | 6b53e7e16df0a2451d2b7948ad35485301c564b6 (diff) | |
parent | 369998639b37b5de46ab1b19b3dd6ca6c2b77d34 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
examples/quick/demos/photoviewer/i18n/qml_de.ts
examples/quick/demos/photoviewer/i18n/qml_fr.ts
examples/quick/demos/photoviewer/photoviewer.pro
examples/quick/demos/photoviewer/qml.qrc
src/qml/compiler/qv4instr_moth_p.h
tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
Change-Id: Ibea76b468577c2a68bd305cee82ae6444d0f8073
Diffstat (limited to 'tests/auto/quick/qquickanimations')
-rw-r--r-- | tests/auto/quick/qquickanimations/data/replacingTransitions.qml | 51 | ||||
-rw-r--r-- | tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | 37 |
2 files changed, 0 insertions, 88 deletions
diff --git a/tests/auto/quick/qquickanimations/data/replacingTransitions.qml b/tests/auto/quick/qquickanimations/data/replacingTransitions.qml deleted file mode 100644 index ff7c50cd67..0000000000 --- a/tests/auto/quick/qquickanimations/data/replacingTransitions.qml +++ /dev/null @@ -1,51 +0,0 @@ -import QtQuick 2.9 - -Rectangle { - id: theRoot - property alias model: theModel - property alias addTimer: addToModel - property alias addTransition: addTrans - property alias displaceTransition: displaceTrans - - width: 400 - height: 400 - - ListModel { - id: theModel - } - Timer { - id: addToModel - interval: 1000 - running: false - repeat: true - onTriggered: { - theModel.insert(0, {"name": "item " + theModel.count}) - if (theModel.count > 2) - stop() - } - } - Component { - id: listDelegate - Text { - text: name - } - } - ListView { - id: listView - - property int animationDuration: 10000 - - anchors.fill: parent - model: theModel - delegate: listDelegate - add: Transition { - id: addTrans - NumberAnimation { properties: "x"; from: 400; duration: listView.animationDuration } - NumberAnimation { properties: "y"; from: 400; duration: listView.animationDuration } - } - addDisplaced: Transition { - id: displaceTrans - NumberAnimation { properties: "x,y"; duration: listView.animationDuration } - } - } -} diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index 0f095774e8..3cfe03a376 100644 --- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -29,8 +29,6 @@ #include <QtQml/qqmlengine.h> #include <QtQml/qqmlcomponent.h> #include <QtQuick/qquickview.h> -#include <QtQml/private/qqmltimer_p.h> -#include <QtQml/private/qqmllistmodel_p.h> #include <QtQml/private/qanimationgroupjob_p.h> #include <QtQuick/private/qquickrectangle_p.h> #include <QtQuick/private/qquickitemanimation_p.h> @@ -108,7 +106,6 @@ private slots: void pathLineUnspecifiedXYBug(); void unsetAnimatorProxyJobWindow(); void finished(); - void replacingTransitions(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -1689,40 +1686,6 @@ void tst_qquickanimations::finished() } } -void tst_qquickanimations::replacingTransitions() -{ - QQmlEngine engine; - QQmlComponent c(&engine, testFileUrl("replacingTransitions.qml")); - QScopedPointer<QQuickRectangle> rect(qobject_cast<QQuickRectangle*>(c.create())); - if (!c.errors().isEmpty()) - qDebug() << c.errorString(); - QVERIFY(rect); - - QQmlTimer *addTimer = rect->property("addTimer").value<QQmlTimer*>(); - QVERIFY(addTimer); - QCOMPARE(addTimer->isRunning(), false); - - QQuickTransition *addTrans = rect->property("addTransition").value<QQuickTransition*>(); - QVERIFY(addTrans); - QCOMPARE(addTrans->running(), false); - - QQuickTransition *displaceTrans = rect->property("displaceTransition").value<QQuickTransition*>(); - QVERIFY(displaceTrans); - QCOMPARE(displaceTrans->running(), false); - - QQmlListModel *model = rect->property("model").value<QQmlListModel *>(); - QVERIFY(model); - QCOMPARE(model->count(), 0); - - addTimer->start(); - QTest::qWait(1000 + 1000 + 10000); - - QTRY_COMPARE(addTimer->isRunning(), false); - QTRY_COMPARE(addTrans->running(), false); - QTRY_COMPARE(displaceTrans->running(), false); - QCOMPARE(model->count(), 3); -} - QTEST_MAIN(tst_qquickanimations) #include "tst_qquickanimations.moc" |