diff options
Diffstat (limited to 'tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp')
-rw-r--r-- | tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp b/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp index bd17bf4143..be7ad304b6 100644 --- a/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp +++ b/tests/auto/quick/qquickbehaviors/tst_qquickbehaviors.cpp @@ -80,6 +80,7 @@ private slots: void sameValue(); void delayedRegistration(); void startOnCompleted(); + void multipleChangesToValueType(); }; void tst_qquickbehaviors::simpleBehavior() @@ -468,6 +469,32 @@ void tst_qquickbehaviors::startOnCompleted() delete rect; } +//QTBUG-25139 +void tst_qquickbehaviors::multipleChangesToValueType() +{ + QQmlEngine engine; + + QQmlComponent c(&engine, testFileUrl("multipleChangesToValueType.qml")); + QScopedPointer<QQuickRectangle> rect(qobject_cast<QQuickRectangle *>(c.create())); + QVERIFY(rect != 0); + + QQuickText *text = rect->findChild<QQuickText *>(); + QVERIFY(text != 0); + + QFont value; + value.setPointSize(24); + QCOMPARE(text->property("font").value<QFont>(), value); + + QVERIFY(QMetaObject::invokeMethod(rect.data(), "updateFontProperties")); + + value.setItalic(true); + value.setWeight(QFont::Bold); + QCOMPARE(text->property("font").value<QFont>(), value); + + value.setPointSize(48); + QTRY_COMPARE(text->property("font").value<QFont>(), value); +} + QTEST_MAIN(tst_qquickbehaviors) #include "tst_qquickbehaviors.moc" |