aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-20 01:00:05 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-20 01:00:05 +0200
commit4050d0eddd33c9a77d4ffe285e137280ec5dd5fe (patch)
tree11580451e6478254d0c38a41f6670ea40c7a68a7 /tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
parent8068e7b98cde09565efe27585b84e120f9c5ea99 (diff)
parentaf0d8632d8895373287bdf8f917272a0fa1820e0 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'tests/auto/quick/qquickanimations/tst_qquickanimations.cpp')
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index b75dc8bc6b..f5faa14265 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -109,6 +109,7 @@ private slots:
void unsetAnimatorProxyJobWindow();
void finished();
void replacingTransitions();
+ void animationJobSelfDestruction();
};
#define QTIMED_COMPARE(lhs, rhs) do { \
@@ -1723,6 +1724,26 @@ void tst_qquickanimations::replacingTransitions()
QCOMPARE(model->count(), 3);
}
+void tst_qquickanimations::animationJobSelfDestruction()
+{
+ // Don't crash
+ QQmlEngine engine;
+ engine.clearComponentCache();
+ QQmlComponent c(&engine, testFileUrl("animationJobSelfDestructionBug.qml"));
+ QScopedPointer<QQuickWindow> win(qobject_cast<QQuickWindow*>(c.create()));
+ if (!c.errors().isEmpty())
+ qDebug() << c.errorString();
+ QVERIFY(win);
+ win->setTitle(QTest::currentTestFunction());
+ win->show();
+ QVERIFY(QTest::qWaitForWindowExposed(win.data()));
+ QQmlTimer *timer = win->property("timer").value<QQmlTimer*>();
+ QVERIFY(timer);
+ QCOMPARE(timer->isRunning(), false);
+ timer->start();
+ QTest::qWait(1000);
+}
+
QTEST_MAIN(tst_qquickanimations)
#include "tst_qquickanimations.moc"