diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 03:31:25 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 03:33:39 (GMT) |
commit | 45ca7aff2c04c302906a1af0d9d671bb9cb452f0 (patch) | |
tree | 3d486beafbe66ec7fe0b6451abec652211c1328d /tests/auto | |
parent | 25f17fb8e566fca0838545941d3e0281698ec355 (diff) | |
download | Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.zip Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.tar.gz Qt-45ca7aff2c04c302906a1af0d9d671bb9cb452f0.tar.bz2 |
Use variant instead of var in QML
In QML "var"s are not the same as JavaScript vars - they are QVariants
instead. However, as they behave in a similar enough fashion to native
JavaScript it can be confusing to developers when they are called "var".
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml | 6 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml index 483179a..416dbce 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml @@ -14,12 +14,6 @@ QtObject { } try { - root.b = [ 10, root ] - } catch(e) { - console.log (e.fileName + ":" + e.lineNumber + ":" + e); - } - - try { root.a = "Hello"; } catch(e) { console.log (e.fileName + ":" + e.lineNumber + ":" + e); diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 72f14f9..c6bb276 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1026,12 +1026,10 @@ void tst_qdeclarativeecmascript::propertyAssignmentErrors() QString url = component.url().toString(); QString warning1 = url + ":11:Error: Cannot assign [undefined] to int"; - QString warning2 = url + ":17:Error: Cannot assign JavaScript array to QML variant property"; - QString warning3 = url + ":23:Error: Cannot assign QString to int"; + QString warning2 = url + ":17:Error: Cannot assign QString to int"; QTest::ignoreMessage(QtDebugMsg, warning1.toLatin1().constData()); QTest::ignoreMessage(QtDebugMsg, warning2.toLatin1().constData()); - QTest::ignoreMessage(QtDebugMsg, warning3.toLatin1().constData()); QObject *object = component.create(); QVERIFY(object != 0); |