--- /dev/null
+import QtQuick 2.0
+
+Rectangle {
+ id: rect
+ width: 200
+ height: 200
+
+ property bool animating: false
+ property int value: 0
+
+ NumberAnimation on value {
+ objectName: "animation"
+ paused: !rect.animating
+ to: 100
+ duration: 50
+ }
+}
void doubleRegistrationBug();
void alwaysRunToEndRestartBug();
void transitionAssignmentBug();
+ void pauseBindingBug();
};
#define QTIMED_COMPARE(lhs, rhs) do { \
QCOMPARE(rect->property("nullObject").toBool(), false);
}
+//QTBUG-19080
+void tst_qdeclarativeanimations::pauseBindingBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/pauseBindingBug.qml");
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeAbstractAnimation *anim = rect->findChild<QDeclarativeAbstractAnimation*>("animation");
+ QVERIFY(anim->qtAnimation()->state() == QAbstractAnimation::Paused);
+
+ delete rect;
+}
+
QTEST_MAIN(tst_qdeclarativeanimations)
#include "tst_qdeclarativeanimations.moc"