summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpropertyanimation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-07 11:41:34 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-07 11:41:34 +0200
commita99a849dffc51a76256e880a81e6829c76199559 (patch)
tree3a2d1fec3805e3e54f1d4d362e85070163bea61e /tests/auto/qpropertyanimation
parent0db46b7a592017a4ec541ce703b787458eeb8287 (diff)
Addeed a warning if one is trying to animate a property that's not part
of the object Task-number: 251763
Diffstat (limited to 'tests/auto/qpropertyanimation')
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index f0deab5ad9..2e5fd005a1 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -624,6 +624,7 @@ QVariant xaxisQPointInterpolator(const QPointF &f, const QPointF &t, qreal progr
void tst_QPropertyAnimation::interpolated()
{
QObject o;
+ o.setProperty("point", QPointF()); //this will avoid warnings
o.setProperty("number", qVariantFromValue<Number>(Number(42)));
QCOMPARE(qVariantValue<Number>(o.property("number")), Number(42));
{
@@ -649,9 +650,9 @@ void tst_QPropertyAnimation::interpolated()
anim.start();
anim.pause();
anim.setCurrentTime(100);
- QCOMPARE(o.property("point").toPointF(), QPointF(10, 0));
+ QCOMPARE(o.property("point"), QVariant(QPointF(10, 0)));
anim.setCurrentTime(500);
- QCOMPARE(o.property("point").toPointF(), QPointF(50, 0));
+ QCOMPARE(o.property("point"), QVariant(QPointF(50, 0)));
}
{
// unregister it and see if we get back the default behaviour