diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-02-27 10:51:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-05 10:06:48 +0100 |
commit | 92b1f9981d225ecee28da1f0a88fb3046000cb5e (patch) | |
tree | 83ddfc1b5372d114e8ea46fd78d008966a7d4bd3 /tests | |
parent | b6e78b38367a23f0b053bbd2abe4ef161e4053b9 (diff) |
Allow function assignment to cause binding for non-var props
This patch maintains the old function-assignment behaviour for non-var
properties, and will be reverted soon.
Change-Id: I523e464501106616c51ff7478f7eb7171c1ca350
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 9c8d1e750b..45406390de 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -5109,13 +5109,15 @@ void tst_qqmlecmascript::functionAssignment_afterBinding() QQmlComponent component(&engine, testFileUrl("functionAssignment.3.qml")); QString url = component.url().toString(); - QString w1 = url + ":16: Error: Cannot assign JavaScript function to int"; + //QString w1 = url + ":16: Error: Cannot assign JavaScript function to int"; // for now, function assignment = binding assignment + QString w1 = QLatin1String("WARNING: function assignment is DEPRECATED and will be removed! Wrap RHS in Qt.binding(): ") + url + QLatin1String(":16"); QTest::ignoreMessage(QtWarningMsg, w1.toLatin1().constData()); QObject *o = component.create(); QVERIFY(o != 0); QCOMPARE(o->property("t1"), QVariant::fromValue<int>(4)); // should have bound - QCOMPARE(o->property("t2"), QVariant::fromValue<int>(2)); // should not have changed + //QCOMPARE(o->property("t2"), QVariant::fromValue<int>(2)); // should not have changed + QCOMPARE(o->property("t2"), QVariant::fromValue<int>(4)); // for now, function assignment = binding assignment delete o; } |