From 0b01202d770a5847af00dc6ebba0d2a75f1a271b Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 12 May 2009 12:23:31 +0200 Subject: Kill warning in removeDefaultAnimation() test Warning about animating non-existent properties. --- tests/auto/qstatemachine/tst_qstatemachine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index df19f26..d24a945 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -2715,9 +2715,12 @@ void tst_QStateMachine::removeDefaultAnimation() { QStateMachine machine; + QObject propertyHolder; + propertyHolder.setProperty("foo", 0); + QCOMPARE(machine.defaultAnimations().size(), 0); - QPropertyAnimation *anim = new QPropertyAnimation(this, "foo"); + QPropertyAnimation *anim = new QPropertyAnimation(&propertyHolder, "foo"); machine.addDefaultAnimation(anim); @@ -2730,7 +2733,7 @@ void tst_QStateMachine::removeDefaultAnimation() machine.addDefaultAnimation(anim); - QPropertyAnimation *anim2 = new QPropertyAnimation(this, "foo"); + QPropertyAnimation *anim2 = new QPropertyAnimation(&propertyHolder, "foo"); machine.addDefaultAnimation(anim2); QCOMPARE(machine.defaultAnimations().size(), 2); -- cgit v0.12