From 7636fe8d8dee269c71189eca93700667f5dd8a96 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 21 Aug 2009 09:39:42 +1000 Subject: notice --- src/declarative/QmlChanges.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index b95faf3..7fba47a 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -2,7 +2,9 @@ QML API Review ============== The QML API is being reviewed from 17 to 28 August 2009. This -file documents the changes. +file documents the changes. Note that the changes are incremental, +so a rename A->B for example may be follow by another subseqent +rename B->C, if later reviews override earlier reviews. API Changes =========== -- cgit v0.12 From eb9de9ac563ac2821619c0844800c849af25cd5f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 21 Aug 2009 16:12:13 +1000 Subject: update error messages --- tests/auto/declarative/animations/tst_animations.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp index a493454..889d9b7 100644 --- a/tests/auto/declarative/animations/tst_animations.cpp +++ b/tests/auto/declarative/animations/tst_animations.cpp @@ -37,7 +37,7 @@ void tst_animations::badTypes() c.create(); QVERIFY(c.errors().count() == 1); - QCOMPARE(c.errors().at(0).description(), QLatin1String("Cannot convert value \"blue\" to double number")); + QCOMPARE(c.errors().at(0).description(), QLatin1String("Invalid property assignment: double expected")); } //make sure we get a compiler error @@ -48,7 +48,7 @@ void tst_animations::badTypes() c.create(); QVERIFY(c.errors().count() == 1); - QCOMPARE(c.errors().at(0).description(), QLatin1String("Cannot convert value \"10\" to color")); + QCOMPARE(c.errors().at(0).description(), QLatin1String("Invalid property assignment: color expected")); } } -- cgit v0.12 From 0d85e26fe327751a4ccd5ce9bc35128b7974b780 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 21 Aug 2009 16:16:07 +1000 Subject: Rectangle --- tests/auto/declarative/listview/data/listview.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/listview/data/listview.qml b/tests/auto/declarative/listview/data/listview.qml index 3e7f106..7a3d76f 100644 --- a/tests/auto/declarative/listview/data/listview.qml +++ b/tests/auto/declarative/listview/data/listview.qml @@ -1,6 +1,6 @@ import Qt 4.6 -Rect { +Rectangle { width: 240 height: 320 color: "#ffffff" -- cgit v0.12 From 489f3e32b23211c2a8decb3391a2462f62762f69 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 21 Aug 2009 16:19:43 +1000 Subject: rename to .qml so people update them --- .../declarative/qmlparser/assignBasicTypes.qml | 26 ++++ .../declarative/qmlparser/assignBasicTypes.txt | 26 ---- .../qmlparser/assignLiteralSignalProperty.qml | 4 + .../qmlparser/assignLiteralSignalProperty.txt | 4 - .../declarative/qmlparser/assignObjectToSignal.qml | 4 + .../declarative/qmlparser/assignObjectToSignal.txt | 4 - .../qmlparser/assignObjectToVariant.qml | 6 + .../qmlparser/assignObjectToVariant.txt | 6 - .../declarative/qmlparser/assignQmlComponent.qml | 4 + .../declarative/qmlparser/assignQmlComponent.txt | 4 - tests/auto/declarative/qmlparser/assignSignal.qml | 4 + tests/auto/declarative/qmlparser/assignSignal.txt | 4 - .../declarative/qmlparser/assignTypeExtremes.qml | 5 + .../declarative/qmlparser/assignTypeExtremes.txt | 5 - .../declarative/qmlparser/attachedProperties.qml | 5 + .../declarative/qmlparser/attachedProperties.txt | 5 - .../qmlparser/autoComponentCreation.qml | 4 + .../qmlparser/autoComponentCreation.txt | 4 - .../declarative/qmlparser/customParserTypes.qml | 5 + .../declarative/qmlparser/customParserTypes.txt | 5 - .../declarative/qmlparser/customVariantTypes.qml | 4 + .../declarative/qmlparser/customVariantTypes.txt | 4 - tests/auto/declarative/qmlparser/duplicateIDs.qml | 6 + tests/auto/declarative/qmlparser/duplicateIDs.txt | 6 - .../auto/declarative/qmlparser/dynamicObject.1.qml | 8 ++ .../auto/declarative/qmlparser/dynamicObject.1.txt | 8 -- .../declarative/qmlparser/dynamicProperties.qml | 13 ++ .../declarative/qmlparser/dynamicProperties.txt | 13 -- .../qmlparser/dynamicSignalsAndSlots.qml | 7 + .../qmlparser/dynamicSignalsAndSlots.txt | 7 - tests/auto/declarative/qmlparser/empty.qml | 0 tests/auto/declarative/qmlparser/empty.txt | 0 .../declarative/qmlparser/failingComponent.qml | 5 + .../declarative/qmlparser/failingComponent.txt | 5 - .../auto/declarative/qmlparser/fakeDotProperty.qml | 4 + .../auto/declarative/qmlparser/fakeDotProperty.txt | 4 - tests/auto/declarative/qmlparser/finalOverride.qml | 4 + tests/auto/declarative/qmlparser/finalOverride.txt | 4 - tests/auto/declarative/qmlparser/idProperty.qml | 8 ++ tests/auto/declarative/qmlparser/idProperty.txt | 8 -- .../declarative/qmlparser/inlineQmlComponents.qml | 10 ++ .../declarative/qmlparser/inlineQmlComponents.txt | 10 -- .../declarative/qmlparser/interfaceProperty.qml | 5 + .../declarative/qmlparser/interfaceProperty.txt | 5 - .../auto/declarative/qmlparser/interfaceQList.qml | 7 + .../auto/declarative/qmlparser/interfaceQList.txt | 7 - .../declarative/qmlparser/interfaceQmlList.qml | 7 + .../declarative/qmlparser/interfaceQmlList.txt | 7 - tests/auto/declarative/qmlparser/invalidID.2.qml | 5 + tests/auto/declarative/qmlparser/invalidID.2.txt | 5 - tests/auto/declarative/qmlparser/invalidID.3.qml | 5 + tests/auto/declarative/qmlparser/invalidID.3.txt | 5 - tests/auto/declarative/qmlparser/invalidID.4.qml | 6 + tests/auto/declarative/qmlparser/invalidID.4.txt | 6 - tests/auto/declarative/qmlparser/invalidID.qml | 4 + tests/auto/declarative/qmlparser/invalidID.txt | 4 - .../declarative/qmlparser/listAssignment.1.qml | 4 + .../declarative/qmlparser/listAssignment.1.txt | 4 - .../declarative/qmlparser/listAssignment.2.qml | 4 + .../declarative/qmlparser/listAssignment.2.txt | 4 - .../declarative/qmlparser/listAssignment.3.qml | 6 + .../declarative/qmlparser/listAssignment.3.txt | 6 - tests/auto/declarative/qmlparser/missingObject.qml | 1 + tests/auto/declarative/qmlparser/missingObject.txt | 1 - tests/auto/declarative/qmlparser/missingSignal.qml | 5 + tests/auto/declarative/qmlparser/missingSignal.txt | 5 - .../qmlparser/nonexistantProperty.1.qml | 2 + .../qmlparser/nonexistantProperty.1.txt | 2 - .../qmlparser/nonexistantProperty.2.qml | 4 + .../qmlparser/nonexistantProperty.2.txt | 4 - .../qmlparser/nonexistantProperty.3.qml | 4 + .../qmlparser/nonexistantProperty.3.txt | 4 - .../qmlparser/nonexistantProperty.4.qml | 4 + .../qmlparser/nonexistantProperty.4.txt | 4 - .../qmlparser/nonexistantProperty.5.qml | 4 + .../qmlparser/nonexistantProperty.5.txt | 4 - .../qmlparser/nonexistantProperty.6.qml | 4 + .../qmlparser/nonexistantProperty.6.txt | 4 - .../auto/declarative/qmlparser/nullDotProperty.qml | 4 + .../auto/declarative/qmlparser/nullDotProperty.txt | 4 - .../declarative/qmlparser/propertyValueSource.qml | 4 + .../declarative/qmlparser/propertyValueSource.txt | 4 - tests/auto/declarative/qmlparser/readOnly.1.qml | 4 + tests/auto/declarative/qmlparser/readOnly.1.txt | 4 - tests/auto/declarative/qmlparser/readOnly.2.qml | 4 + tests/auto/declarative/qmlparser/readOnly.2.txt | 4 - .../declarative/qmlparser/rootAsQmlComponent.qml | 6 + .../declarative/qmlparser/rootAsQmlComponent.txt | 6 - .../auto/declarative/qmlparser/simpleBindings.qml | 18 +++ .../auto/declarative/qmlparser/simpleBindings.txt | 18 --- .../auto/declarative/qmlparser/simpleContainer.qml | 5 + .../auto/declarative/qmlparser/simpleContainer.txt | 5 - tests/auto/declarative/qmlparser/simpleObject.qml | 2 + tests/auto/declarative/qmlparser/simpleObject.txt | 2 - tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 142 ++++++++++----------- .../declarative/qmlparser/unregisteredObject.qml | 2 + .../declarative/qmlparser/unregisteredObject.txt | 2 - .../declarative/qmlparser/unsupportedProperty.qml | 4 + .../declarative/qmlparser/unsupportedProperty.txt | 4 - tests/auto/declarative/qmlparser/valueTypes.qml | 13 ++ tests/auto/declarative/qmlparser/valueTypes.txt | 13 -- tests/auto/declarative/qmlparser/wrongType.1.qml | 4 + tests/auto/declarative/qmlparser/wrongType.1.txt | 4 - tests/auto/declarative/qmlparser/wrongType.10.qml | 5 + tests/auto/declarative/qmlparser/wrongType.10.txt | 5 - tests/auto/declarative/qmlparser/wrongType.11.qml | 5 + tests/auto/declarative/qmlparser/wrongType.11.txt | 5 - tests/auto/declarative/qmlparser/wrongType.12.qml | 5 + tests/auto/declarative/qmlparser/wrongType.12.txt | 5 - tests/auto/declarative/qmlparser/wrongType.13.qml | 4 + tests/auto/declarative/qmlparser/wrongType.13.txt | 4 - tests/auto/declarative/qmlparser/wrongType.14.qml | 5 + tests/auto/declarative/qmlparser/wrongType.14.txt | 5 - tests/auto/declarative/qmlparser/wrongType.2.qml | 4 + tests/auto/declarative/qmlparser/wrongType.2.txt | 4 - tests/auto/declarative/qmlparser/wrongType.3.qml | 4 + tests/auto/declarative/qmlparser/wrongType.3.txt | 4 - tests/auto/declarative/qmlparser/wrongType.4.qml | 4 + tests/auto/declarative/qmlparser/wrongType.4.txt | 4 - tests/auto/declarative/qmlparser/wrongType.5.qml | 5 + tests/auto/declarative/qmlparser/wrongType.5.txt | 5 - tests/auto/declarative/qmlparser/wrongType.6.qml | 5 + tests/auto/declarative/qmlparser/wrongType.6.txt | 5 - tests/auto/declarative/qmlparser/wrongType.7.qml | 5 + tests/auto/declarative/qmlparser/wrongType.7.txt | 5 - tests/auto/declarative/qmlparser/wrongType.8.qml | 5 + tests/auto/declarative/qmlparser/wrongType.8.txt | 5 - tests/auto/declarative/qmlparser/wrongType.9.qml | 5 + tests/auto/declarative/qmlparser/wrongType.9.txt | 5 - 129 files changed, 419 insertions(+), 419 deletions(-) create mode 100644 tests/auto/declarative/qmlparser/assignBasicTypes.qml delete mode 100644 tests/auto/declarative/qmlparser/assignBasicTypes.txt create mode 100644 tests/auto/declarative/qmlparser/assignLiteralSignalProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt create mode 100644 tests/auto/declarative/qmlparser/assignObjectToSignal.qml delete mode 100644 tests/auto/declarative/qmlparser/assignObjectToSignal.txt create mode 100644 tests/auto/declarative/qmlparser/assignObjectToVariant.qml delete mode 100644 tests/auto/declarative/qmlparser/assignObjectToVariant.txt create mode 100644 tests/auto/declarative/qmlparser/assignQmlComponent.qml delete mode 100644 tests/auto/declarative/qmlparser/assignQmlComponent.txt create mode 100644 tests/auto/declarative/qmlparser/assignSignal.qml delete mode 100644 tests/auto/declarative/qmlparser/assignSignal.txt create mode 100644 tests/auto/declarative/qmlparser/assignTypeExtremes.qml delete mode 100644 tests/auto/declarative/qmlparser/assignTypeExtremes.txt create mode 100644 tests/auto/declarative/qmlparser/attachedProperties.qml delete mode 100644 tests/auto/declarative/qmlparser/attachedProperties.txt create mode 100644 tests/auto/declarative/qmlparser/autoComponentCreation.qml delete mode 100644 tests/auto/declarative/qmlparser/autoComponentCreation.txt create mode 100644 tests/auto/declarative/qmlparser/customParserTypes.qml delete mode 100644 tests/auto/declarative/qmlparser/customParserTypes.txt create mode 100644 tests/auto/declarative/qmlparser/customVariantTypes.qml delete mode 100644 tests/auto/declarative/qmlparser/customVariantTypes.txt create mode 100644 tests/auto/declarative/qmlparser/duplicateIDs.qml delete mode 100644 tests/auto/declarative/qmlparser/duplicateIDs.txt create mode 100644 tests/auto/declarative/qmlparser/dynamicObject.1.qml delete mode 100644 tests/auto/declarative/qmlparser/dynamicObject.1.txt create mode 100644 tests/auto/declarative/qmlparser/dynamicProperties.qml delete mode 100644 tests/auto/declarative/qmlparser/dynamicProperties.txt create mode 100644 tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.qml delete mode 100644 tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt create mode 100644 tests/auto/declarative/qmlparser/empty.qml delete mode 100644 tests/auto/declarative/qmlparser/empty.txt create mode 100644 tests/auto/declarative/qmlparser/failingComponent.qml delete mode 100644 tests/auto/declarative/qmlparser/failingComponent.txt create mode 100644 tests/auto/declarative/qmlparser/fakeDotProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/fakeDotProperty.txt create mode 100644 tests/auto/declarative/qmlparser/finalOverride.qml delete mode 100644 tests/auto/declarative/qmlparser/finalOverride.txt create mode 100644 tests/auto/declarative/qmlparser/idProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/idProperty.txt create mode 100644 tests/auto/declarative/qmlparser/inlineQmlComponents.qml delete mode 100644 tests/auto/declarative/qmlparser/inlineQmlComponents.txt create mode 100644 tests/auto/declarative/qmlparser/interfaceProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/interfaceProperty.txt create mode 100644 tests/auto/declarative/qmlparser/interfaceQList.qml delete mode 100644 tests/auto/declarative/qmlparser/interfaceQList.txt create mode 100644 tests/auto/declarative/qmlparser/interfaceQmlList.qml delete mode 100644 tests/auto/declarative/qmlparser/interfaceQmlList.txt create mode 100644 tests/auto/declarative/qmlparser/invalidID.2.qml delete mode 100644 tests/auto/declarative/qmlparser/invalidID.2.txt create mode 100644 tests/auto/declarative/qmlparser/invalidID.3.qml delete mode 100644 tests/auto/declarative/qmlparser/invalidID.3.txt create mode 100644 tests/auto/declarative/qmlparser/invalidID.4.qml delete mode 100644 tests/auto/declarative/qmlparser/invalidID.4.txt create mode 100644 tests/auto/declarative/qmlparser/invalidID.qml delete mode 100644 tests/auto/declarative/qmlparser/invalidID.txt create mode 100644 tests/auto/declarative/qmlparser/listAssignment.1.qml delete mode 100644 tests/auto/declarative/qmlparser/listAssignment.1.txt create mode 100644 tests/auto/declarative/qmlparser/listAssignment.2.qml delete mode 100644 tests/auto/declarative/qmlparser/listAssignment.2.txt create mode 100644 tests/auto/declarative/qmlparser/listAssignment.3.qml delete mode 100644 tests/auto/declarative/qmlparser/listAssignment.3.txt create mode 100644 tests/auto/declarative/qmlparser/missingObject.qml delete mode 100644 tests/auto/declarative/qmlparser/missingObject.txt create mode 100644 tests/auto/declarative/qmlparser/missingSignal.qml delete mode 100644 tests/auto/declarative/qmlparser/missingSignal.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.1.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.1.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.2.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.2.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.3.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.3.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.4.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.4.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.5.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.5.txt create mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.6.qml delete mode 100644 tests/auto/declarative/qmlparser/nonexistantProperty.6.txt create mode 100644 tests/auto/declarative/qmlparser/nullDotProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/nullDotProperty.txt create mode 100644 tests/auto/declarative/qmlparser/propertyValueSource.qml delete mode 100644 tests/auto/declarative/qmlparser/propertyValueSource.txt create mode 100644 tests/auto/declarative/qmlparser/readOnly.1.qml delete mode 100644 tests/auto/declarative/qmlparser/readOnly.1.txt create mode 100644 tests/auto/declarative/qmlparser/readOnly.2.qml delete mode 100644 tests/auto/declarative/qmlparser/readOnly.2.txt create mode 100644 tests/auto/declarative/qmlparser/rootAsQmlComponent.qml delete mode 100644 tests/auto/declarative/qmlparser/rootAsQmlComponent.txt create mode 100644 tests/auto/declarative/qmlparser/simpleBindings.qml delete mode 100644 tests/auto/declarative/qmlparser/simpleBindings.txt create mode 100644 tests/auto/declarative/qmlparser/simpleContainer.qml delete mode 100644 tests/auto/declarative/qmlparser/simpleContainer.txt create mode 100644 tests/auto/declarative/qmlparser/simpleObject.qml delete mode 100644 tests/auto/declarative/qmlparser/simpleObject.txt create mode 100644 tests/auto/declarative/qmlparser/unregisteredObject.qml delete mode 100644 tests/auto/declarative/qmlparser/unregisteredObject.txt create mode 100644 tests/auto/declarative/qmlparser/unsupportedProperty.qml delete mode 100644 tests/auto/declarative/qmlparser/unsupportedProperty.txt create mode 100644 tests/auto/declarative/qmlparser/valueTypes.qml delete mode 100644 tests/auto/declarative/qmlparser/valueTypes.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.1.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.1.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.10.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.10.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.11.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.11.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.12.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.12.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.13.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.13.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.14.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.14.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.2.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.2.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.3.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.3.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.4.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.4.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.5.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.5.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.6.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.6.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.7.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.7.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.8.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.8.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.9.qml delete mode 100644 tests/auto/declarative/qmlparser/wrongType.9.txt diff --git a/tests/auto/declarative/qmlparser/assignBasicTypes.qml b/tests/auto/declarative/qmlparser/assignBasicTypes.qml new file mode 100644 index 0000000..cef9f8d --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignBasicTypes.qml @@ -0,0 +1,26 @@ +import Test 1.0 +MyTypeObject { + flagProperty: "FlagVal1 | FlagVal3" + enumProperty: "EnumVal2" + stringProperty: "Hello World!" + uintProperty: 10 + intProperty: -19 + realProperty: 23.2 + doubleProperty: -19.7 + colorProperty: "red" + dateProperty: "1982-11-25" + timeProperty: "11:11:31" + timeProperty: "11:11:32" + timeProperty: "11:11:32" + dateTimeProperty: "2009-05-12T13:22:01" + pointProperty: "99,13" + pointFProperty: "-10.1,12.3" + sizeProperty: "99x13" + sizeFProperty: "0.1x0.2" + rectProperty: "9,7,100x200" + rectFProperty: "1000.1,-10.9,400x90.99" + boolProperty: true + variantProperty: "Hello World!" + + objectProperty: MyTypeObject { intProperty: 8 } +} diff --git a/tests/auto/declarative/qmlparser/assignBasicTypes.txt b/tests/auto/declarative/qmlparser/assignBasicTypes.txt deleted file mode 100644 index cef9f8d..0000000 --- a/tests/auto/declarative/qmlparser/assignBasicTypes.txt +++ /dev/null @@ -1,26 +0,0 @@ -import Test 1.0 -MyTypeObject { - flagProperty: "FlagVal1 | FlagVal3" - enumProperty: "EnumVal2" - stringProperty: "Hello World!" - uintProperty: 10 - intProperty: -19 - realProperty: 23.2 - doubleProperty: -19.7 - colorProperty: "red" - dateProperty: "1982-11-25" - timeProperty: "11:11:31" - timeProperty: "11:11:32" - timeProperty: "11:11:32" - dateTimeProperty: "2009-05-12T13:22:01" - pointProperty: "99,13" - pointFProperty: "-10.1,12.3" - sizeProperty: "99x13" - sizeFProperty: "0.1x0.2" - rectProperty: "9,7,100x200" - rectFProperty: "1000.1,-10.9,400x90.99" - boolProperty: true - variantProperty: "Hello World!" - - objectProperty: MyTypeObject { intProperty: 8 } -} diff --git a/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.qml b/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.qml new file mode 100644 index 0000000..399fcea --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + onLiteralSignal: 10 +} diff --git a/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt b/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt deleted file mode 100644 index 399fcea..0000000 --- a/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - onLiteralSignal: 10 -} diff --git a/tests/auto/declarative/qmlparser/assignObjectToSignal.qml b/tests/auto/declarative/qmlparser/assignObjectToSignal.qml new file mode 100644 index 0000000..789cc66 --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignObjectToSignal.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + onBasicSignal: MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/assignObjectToSignal.txt b/tests/auto/declarative/qmlparser/assignObjectToSignal.txt deleted file mode 100644 index 789cc66..0000000 --- a/tests/auto/declarative/qmlparser/assignObjectToSignal.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - onBasicSignal: MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/assignObjectToVariant.qml b/tests/auto/declarative/qmlparser/assignObjectToVariant.qml new file mode 100644 index 0000000..28c68c4 --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignObjectToVariant.qml @@ -0,0 +1,6 @@ +import Test 1.0 +import Qt 4.6 +Object { + property var a; + a: MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/assignObjectToVariant.txt b/tests/auto/declarative/qmlparser/assignObjectToVariant.txt deleted file mode 100644 index 28c68c4..0000000 --- a/tests/auto/declarative/qmlparser/assignObjectToVariant.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Test 1.0 -import Qt 4.6 -Object { - property var a; - a: MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/assignQmlComponent.qml b/tests/auto/declarative/qmlparser/assignQmlComponent.qml new file mode 100644 index 0000000..20bdc55 --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignQmlComponent.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + MyComponent { x: 10; y: 11; } +} diff --git a/tests/auto/declarative/qmlparser/assignQmlComponent.txt b/tests/auto/declarative/qmlparser/assignQmlComponent.txt deleted file mode 100644 index 20bdc55..0000000 --- a/tests/auto/declarative/qmlparser/assignQmlComponent.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyContainer { - MyComponent { x: 10; y: 11; } -} diff --git a/tests/auto/declarative/qmlparser/assignSignal.qml b/tests/auto/declarative/qmlparser/assignSignal.qml new file mode 100644 index 0000000..153b403 --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignSignal.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + onBasicSignal: basicSlot() +} diff --git a/tests/auto/declarative/qmlparser/assignSignal.txt b/tests/auto/declarative/qmlparser/assignSignal.txt deleted file mode 100644 index 153b403..0000000 --- a/tests/auto/declarative/qmlparser/assignSignal.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - onBasicSignal: basicSlot() -} diff --git a/tests/auto/declarative/qmlparser/assignTypeExtremes.qml b/tests/auto/declarative/qmlparser/assignTypeExtremes.qml new file mode 100644 index 0000000..60ede52 --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignTypeExtremes.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + uintProperty: 4000000000 + intProperty: -2000000000 +} diff --git a/tests/auto/declarative/qmlparser/assignTypeExtremes.txt b/tests/auto/declarative/qmlparser/assignTypeExtremes.txt deleted file mode 100644 index 60ede52..0000000 --- a/tests/auto/declarative/qmlparser/assignTypeExtremes.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - uintProperty: 4000000000 - intProperty: -2000000000 -} diff --git a/tests/auto/declarative/qmlparser/attachedProperties.qml b/tests/auto/declarative/qmlparser/attachedProperties.qml new file mode 100644 index 0000000..8343754 --- /dev/null +++ b/tests/auto/declarative/qmlparser/attachedProperties.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import Qt 4.6 +Object { + MyQmlObject.value: 10 +} diff --git a/tests/auto/declarative/qmlparser/attachedProperties.txt b/tests/auto/declarative/qmlparser/attachedProperties.txt deleted file mode 100644 index 8343754..0000000 --- a/tests/auto/declarative/qmlparser/attachedProperties.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -import Qt 4.6 -Object { - MyQmlObject.value: 10 -} diff --git a/tests/auto/declarative/qmlparser/autoComponentCreation.qml b/tests/auto/declarative/qmlparser/autoComponentCreation.qml new file mode 100644 index 0000000..5d00144 --- /dev/null +++ b/tests/auto/declarative/qmlparser/autoComponentCreation.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + componentProperty : MyTypeObject { realProperty: 9 } +} diff --git a/tests/auto/declarative/qmlparser/autoComponentCreation.txt b/tests/auto/declarative/qmlparser/autoComponentCreation.txt deleted file mode 100644 index 5d00144..0000000 --- a/tests/auto/declarative/qmlparser/autoComponentCreation.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyTypeObject { - componentProperty : MyTypeObject { realProperty: 9 } -} diff --git a/tests/auto/declarative/qmlparser/customParserTypes.qml b/tests/auto/declarative/qmlparser/customParserTypes.qml new file mode 100644 index 0000000..cf2f272 --- /dev/null +++ b/tests/auto/declarative/qmlparser/customParserTypes.qml @@ -0,0 +1,5 @@ +import Qt 4.6 +ListModel { + ListElement { a: 10 } + ListElement { a: 12 } +} diff --git a/tests/auto/declarative/qmlparser/customParserTypes.txt b/tests/auto/declarative/qmlparser/customParserTypes.txt deleted file mode 100644 index cf2f272..0000000 --- a/tests/auto/declarative/qmlparser/customParserTypes.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 -ListModel { - ListElement { a: 10 } - ListElement { a: 12 } -} diff --git a/tests/auto/declarative/qmlparser/customVariantTypes.qml b/tests/auto/declarative/qmlparser/customVariantTypes.qml new file mode 100644 index 0000000..0263ed2 --- /dev/null +++ b/tests/auto/declarative/qmlparser/customVariantTypes.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + customType: "10" +} diff --git a/tests/auto/declarative/qmlparser/customVariantTypes.txt b/tests/auto/declarative/qmlparser/customVariantTypes.txt deleted file mode 100644 index 0263ed2..0000000 --- a/tests/auto/declarative/qmlparser/customVariantTypes.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - customType: "10" -} diff --git a/tests/auto/declarative/qmlparser/duplicateIDs.qml b/tests/auto/declarative/qmlparser/duplicateIDs.qml new file mode 100644 index 0000000..9605b5b --- /dev/null +++ b/tests/auto/declarative/qmlparser/duplicateIDs.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainer { + MyQmlObject { id: MyID } + MyQmlObject { id: MyID } +} + diff --git a/tests/auto/declarative/qmlparser/duplicateIDs.txt b/tests/auto/declarative/qmlparser/duplicateIDs.txt deleted file mode 100644 index 9605b5b..0000000 --- a/tests/auto/declarative/qmlparser/duplicateIDs.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Test 1.0 -MyContainer { - MyQmlObject { id: MyID } - MyQmlObject { id: MyID } -} - diff --git a/tests/auto/declarative/qmlparser/dynamicObject.1.qml b/tests/auto/declarative/qmlparser/dynamicObject.1.qml new file mode 100644 index 0000000..4be0c8d --- /dev/null +++ b/tests/auto/declarative/qmlparser/dynamicObject.1.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import Qt 4.6 +SetProperties { + propa: a + 10 + propb: Math.min(a, 10) + propc: MyPropertyValueSource {} + onPropA: a +} diff --git a/tests/auto/declarative/qmlparser/dynamicObject.1.txt b/tests/auto/declarative/qmlparser/dynamicObject.1.txt deleted file mode 100644 index 4be0c8d..0000000 --- a/tests/auto/declarative/qmlparser/dynamicObject.1.txt +++ /dev/null @@ -1,8 +0,0 @@ -import Test 1.0 -import Qt 4.6 -SetProperties { - propa: a + 10 - propb: Math.min(a, 10) - propc: MyPropertyValueSource {} - onPropA: a -} diff --git a/tests/auto/declarative/qmlparser/dynamicProperties.qml b/tests/auto/declarative/qmlparser/dynamicProperties.qml new file mode 100644 index 0000000..f93e446 --- /dev/null +++ b/tests/auto/declarative/qmlparser/dynamicProperties.qml @@ -0,0 +1,13 @@ +import Test 1.0 +import Qt 4.6 +Object { + default property int intProperty : 10 + property bool boolProperty: false + property double doubleProperty: -10.1 + property real realProperty: -19.9 + property string stringProperty: "Hello World!" + property color colorProperty: "red" + property date dateProperty: "1945-09-02" + property var varProperty: "Hello World!" + property variant variantProperty: 12 +} diff --git a/tests/auto/declarative/qmlparser/dynamicProperties.txt b/tests/auto/declarative/qmlparser/dynamicProperties.txt deleted file mode 100644 index f93e446..0000000 --- a/tests/auto/declarative/qmlparser/dynamicProperties.txt +++ /dev/null @@ -1,13 +0,0 @@ -import Test 1.0 -import Qt 4.6 -Object { - default property int intProperty : 10 - property bool boolProperty: false - property double doubleProperty: -10.1 - property real realProperty: -19.9 - property string stringProperty: "Hello World!" - property color colorProperty: "red" - property date dateProperty: "1945-09-02" - property var varProperty: "Hello World!" - property variant variantProperty: 12 -} diff --git a/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.qml b/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.qml new file mode 100644 index 0000000..b0ca970 --- /dev/null +++ b/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.qml @@ -0,0 +1,7 @@ +import Qt 4.6 +Object { + signal signal1 + function slot1() {} + signal signal2 + function slot2() {} +} diff --git a/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt b/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt deleted file mode 100644 index b0ca970..0000000 --- a/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt +++ /dev/null @@ -1,7 +0,0 @@ -import Qt 4.6 -Object { - signal signal1 - function slot1() {} - signal signal2 - function slot2() {} -} diff --git a/tests/auto/declarative/qmlparser/empty.qml b/tests/auto/declarative/qmlparser/empty.qml new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/declarative/qmlparser/empty.txt b/tests/auto/declarative/qmlparser/empty.txt deleted file mode 100644 index e69de29..0000000 diff --git a/tests/auto/declarative/qmlparser/failingComponent.qml b/tests/auto/declarative/qmlparser/failingComponent.qml new file mode 100644 index 0000000..bc21243 --- /dev/null +++ b/tests/auto/declarative/qmlparser/failingComponent.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyContainer { + FailingComponent {} +} + diff --git a/tests/auto/declarative/qmlparser/failingComponent.txt b/tests/auto/declarative/qmlparser/failingComponent.txt deleted file mode 100644 index bc21243..0000000 --- a/tests/auto/declarative/qmlparser/failingComponent.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyContainer { - FailingComponent {} -} - diff --git a/tests/auto/declarative/qmlparser/fakeDotProperty.qml b/tests/auto/declarative/qmlparser/fakeDotProperty.qml new file mode 100644 index 0000000..d971eee --- /dev/null +++ b/tests/auto/declarative/qmlparser/fakeDotProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value.something: "hello" +} diff --git a/tests/auto/declarative/qmlparser/fakeDotProperty.txt b/tests/auto/declarative/qmlparser/fakeDotProperty.txt deleted file mode 100644 index d971eee..0000000 --- a/tests/auto/declarative/qmlparser/fakeDotProperty.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - value.something: "hello" -} diff --git a/tests/auto/declarative/qmlparser/finalOverride.qml b/tests/auto/declarative/qmlparser/finalOverride.qml new file mode 100644 index 0000000..a84393a --- /dev/null +++ b/tests/auto/declarative/qmlparser/finalOverride.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + property int value: 10 +} diff --git a/tests/auto/declarative/qmlparser/finalOverride.txt b/tests/auto/declarative/qmlparser/finalOverride.txt deleted file mode 100644 index a84393a..0000000 --- a/tests/auto/declarative/qmlparser/finalOverride.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - property int value: 10 -} diff --git a/tests/auto/declarative/qmlparser/idProperty.qml b/tests/auto/declarative/qmlparser/idProperty.qml new file mode 100644 index 0000000..a413c0b --- /dev/null +++ b/tests/auto/declarative/qmlparser/idProperty.qml @@ -0,0 +1,8 @@ +import Test 1.0 +MyContainer { + property var object : MyObjectId + + MyTypeObject { + id: "MyObjectId" + } +} diff --git a/tests/auto/declarative/qmlparser/idProperty.txt b/tests/auto/declarative/qmlparser/idProperty.txt deleted file mode 100644 index a413c0b..0000000 --- a/tests/auto/declarative/qmlparser/idProperty.txt +++ /dev/null @@ -1,8 +0,0 @@ -import Test 1.0 -MyContainer { - property var object : MyObjectId - - MyTypeObject { - id: "MyObjectId" - } -} diff --git a/tests/auto/declarative/qmlparser/inlineQmlComponents.qml b/tests/auto/declarative/qmlparser/inlineQmlComponents.qml new file mode 100644 index 0000000..79ceda6 --- /dev/null +++ b/tests/auto/declarative/qmlparser/inlineQmlComponents.qml @@ -0,0 +1,10 @@ +import Test 1.0 +import Qt 4.6 +MyContainer { + Component { + id: MyComponent + MyQmlObject { + value: 11 + } + } +} diff --git a/tests/auto/declarative/qmlparser/inlineQmlComponents.txt b/tests/auto/declarative/qmlparser/inlineQmlComponents.txt deleted file mode 100644 index 79ceda6..0000000 --- a/tests/auto/declarative/qmlparser/inlineQmlComponents.txt +++ /dev/null @@ -1,10 +0,0 @@ -import Test 1.0 -import Qt 4.6 -MyContainer { - Component { - id: MyComponent - MyQmlObject { - value: 11 - } - } -} diff --git a/tests/auto/declarative/qmlparser/interfaceProperty.qml b/tests/auto/declarative/qmlparser/interfaceProperty.qml new file mode 100644 index 0000000..70879ff --- /dev/null +++ b/tests/auto/declarative/qmlparser/interfaceProperty.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import Qt 4.6 +MyQmlObject { + interfaceProperty: MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/interfaceProperty.txt b/tests/auto/declarative/qmlparser/interfaceProperty.txt deleted file mode 100644 index 70879ff..0000000 --- a/tests/auto/declarative/qmlparser/interfaceProperty.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -import Qt 4.6 -MyQmlObject { - interfaceProperty: MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/interfaceQList.qml b/tests/auto/declarative/qmlparser/interfaceQList.qml new file mode 100644 index 0000000..c87dfae --- /dev/null +++ b/tests/auto/declarative/qmlparser/interfaceQList.qml @@ -0,0 +1,7 @@ +import Test 1.0 +MyContainer { + qlistInterfaces: [ + MyQmlObject {}, + MyQmlObject {} + ] +} diff --git a/tests/auto/declarative/qmlparser/interfaceQList.txt b/tests/auto/declarative/qmlparser/interfaceQList.txt deleted file mode 100644 index c87dfae..0000000 --- a/tests/auto/declarative/qmlparser/interfaceQList.txt +++ /dev/null @@ -1,7 +0,0 @@ -import Test 1.0 -MyContainer { - qlistInterfaces: [ - MyQmlObject {}, - MyQmlObject {} - ] -} diff --git a/tests/auto/declarative/qmlparser/interfaceQmlList.qml b/tests/auto/declarative/qmlparser/interfaceQmlList.qml new file mode 100644 index 0000000..8392bea --- /dev/null +++ b/tests/auto/declarative/qmlparser/interfaceQmlList.qml @@ -0,0 +1,7 @@ +import Test 1.0 +MyContainer { + qmllistInterfaces: [ + MyQmlObject {}, + MyQmlObject {} + ] +} diff --git a/tests/auto/declarative/qmlparser/interfaceQmlList.txt b/tests/auto/declarative/qmlparser/interfaceQmlList.txt deleted file mode 100644 index 8392bea..0000000 --- a/tests/auto/declarative/qmlparser/interfaceQmlList.txt +++ /dev/null @@ -1,7 +0,0 @@ -import Test 1.0 -MyContainer { - qmllistInterfaces: [ - MyQmlObject {}, - MyQmlObject {} - ] -} diff --git a/tests/auto/declarative/qmlparser/invalidID.2.qml b/tests/auto/declarative/qmlparser/invalidID.2.qml new file mode 100644 index 0000000..4fb3b29 --- /dev/null +++ b/tests/auto/declarative/qmlparser/invalidID.2.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: "" +} + diff --git a/tests/auto/declarative/qmlparser/invalidID.2.txt b/tests/auto/declarative/qmlparser/invalidID.2.txt deleted file mode 100644 index 4fb3b29..0000000 --- a/tests/auto/declarative/qmlparser/invalidID.2.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyQmlObject { - id: "" -} - diff --git a/tests/auto/declarative/qmlparser/invalidID.3.qml b/tests/auto/declarative/qmlparser/invalidID.3.qml new file mode 100644 index 0000000..6684172 --- /dev/null +++ b/tests/auto/declarative/qmlparser/invalidID.3.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id.other: 10 +} + diff --git a/tests/auto/declarative/qmlparser/invalidID.3.txt b/tests/auto/declarative/qmlparser/invalidID.3.txt deleted file mode 100644 index 6684172..0000000 --- a/tests/auto/declarative/qmlparser/invalidID.3.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyQmlObject { - id.other: 10 -} - diff --git a/tests/auto/declarative/qmlparser/invalidID.4.qml b/tests/auto/declarative/qmlparser/invalidID.4.qml new file mode 100644 index 0000000..1f15fce --- /dev/null +++ b/tests/auto/declarative/qmlparser/invalidID.4.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyQmlObject { + id: Hello + id: World +} + diff --git a/tests/auto/declarative/qmlparser/invalidID.4.txt b/tests/auto/declarative/qmlparser/invalidID.4.txt deleted file mode 100644 index 1f15fce..0000000 --- a/tests/auto/declarative/qmlparser/invalidID.4.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Test 1.0 -MyQmlObject { - id: Hello - id: World -} - diff --git a/tests/auto/declarative/qmlparser/invalidID.qml b/tests/auto/declarative/qmlparser/invalidID.qml new file mode 100644 index 0000000..04db3eb --- /dev/null +++ b/tests/auto/declarative/qmlparser/invalidID.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + id: 1 +} diff --git a/tests/auto/declarative/qmlparser/invalidID.txt b/tests/auto/declarative/qmlparser/invalidID.txt deleted file mode 100644 index 04db3eb..0000000 --- a/tests/auto/declarative/qmlparser/invalidID.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - id: 1 -} diff --git a/tests/auto/declarative/qmlparser/listAssignment.1.qml b/tests/auto/declarative/qmlparser/listAssignment.1.qml new file mode 100644 index 0000000..4240425 --- /dev/null +++ b/tests/auto/declarative/qmlparser/listAssignment.1.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + qmllistInterfaces: 1 +} diff --git a/tests/auto/declarative/qmlparser/listAssignment.1.txt b/tests/auto/declarative/qmlparser/listAssignment.1.txt deleted file mode 100644 index 4240425..0000000 --- a/tests/auto/declarative/qmlparser/listAssignment.1.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyContainer { - qmllistInterfaces: 1 -} diff --git a/tests/auto/declarative/qmlparser/listAssignment.2.qml b/tests/auto/declarative/qmlparser/listAssignment.2.qml new file mode 100644 index 0000000..e3baadb --- /dev/null +++ b/tests/auto/declarative/qmlparser/listAssignment.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + children: 2 +} diff --git a/tests/auto/declarative/qmlparser/listAssignment.2.txt b/tests/auto/declarative/qmlparser/listAssignment.2.txt deleted file mode 100644 index e3baadb..0000000 --- a/tests/auto/declarative/qmlparser/listAssignment.2.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyContainer { - children: 2 -} diff --git a/tests/auto/declarative/qmlparser/listAssignment.3.qml b/tests/auto/declarative/qmlparser/listAssignment.3.qml new file mode 100644 index 0000000..00c4c6b --- /dev/null +++ b/tests/auto/declarative/qmlparser/listAssignment.3.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainer { + children: childBinding.expression + children: childBinding2.expression +} + diff --git a/tests/auto/declarative/qmlparser/listAssignment.3.txt b/tests/auto/declarative/qmlparser/listAssignment.3.txt deleted file mode 100644 index 00c4c6b..0000000 --- a/tests/auto/declarative/qmlparser/listAssignment.3.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Test 1.0 -MyContainer { - children: childBinding.expression - children: childBinding2.expression -} - diff --git a/tests/auto/declarative/qmlparser/missingObject.qml b/tests/auto/declarative/qmlparser/missingObject.qml new file mode 100644 index 0000000..2f17045 --- /dev/null +++ b/tests/auto/declarative/qmlparser/missingObject.qml @@ -0,0 +1 @@ +something: 24 diff --git a/tests/auto/declarative/qmlparser/missingObject.txt b/tests/auto/declarative/qmlparser/missingObject.txt deleted file mode 100644 index 2f17045..0000000 --- a/tests/auto/declarative/qmlparser/missingObject.txt +++ /dev/null @@ -1 +0,0 @@ -something: 24 diff --git a/tests/auto/declarative/qmlparser/missingSignal.qml b/tests/auto/declarative/qmlparser/missingSignal.qml new file mode 100644 index 0000000..fd489ca --- /dev/null +++ b/tests/auto/declarative/qmlparser/missingSignal.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import Qt 4.6 +Object { + onClicked: print("Hello world!") +} diff --git a/tests/auto/declarative/qmlparser/missingSignal.txt b/tests/auto/declarative/qmlparser/missingSignal.txt deleted file mode 100644 index fd489ca..0000000 --- a/tests/auto/declarative/qmlparser/missingSignal.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -import Qt 4.6 -Object { - onClicked: print("Hello world!") -} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.1.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.1.qml new file mode 100644 index 0000000..df7406c --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.1.qml @@ -0,0 +1,2 @@ +import Test 1.0 +MyQmlObject { something: 24 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt deleted file mode 100644 index df7406c..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt +++ /dev/null @@ -1,2 +0,0 @@ -import Test 1.0 -MyQmlObject { something: 24 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.2.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.2.qml new file mode 100644 index 0000000..06ccd37 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: 24 +} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt deleted file mode 100644 index 06ccd37..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - something: 24 -} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.3.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.3.qml new file mode 100644 index 0000000..5b08608 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.3.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: 1 + 1 +} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt deleted file mode 100644 index 5b08608..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - something: 1 + 1 -} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.4.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.4.qml new file mode 100644 index 0000000..6579191 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.4.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: ; +} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt deleted file mode 100644 index 6579191..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - something: ; -} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.5.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.5.qml new file mode 100644 index 0000000..37af057 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.5.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + 24 +} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt deleted file mode 100644 index 37af057..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - 24 -} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.6.qml b/tests/auto/declarative/qmlparser/nonexistantProperty.6.qml new file mode 100644 index 0000000..5cd55d0 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.6.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt deleted file mode 100644 index 5cd55d0..0000000 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/nullDotProperty.qml b/tests/auto/declarative/qmlparser/nullDotProperty.qml new file mode 100644 index 0000000..4e36779 --- /dev/null +++ b/tests/auto/declarative/qmlparser/nullDotProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyDotPropertyObject { + obj.value: 1 +} diff --git a/tests/auto/declarative/qmlparser/nullDotProperty.txt b/tests/auto/declarative/qmlparser/nullDotProperty.txt deleted file mode 100644 index 4e36779..0000000 --- a/tests/auto/declarative/qmlparser/nullDotProperty.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyDotPropertyObject { - obj.value: 1 -} diff --git a/tests/auto/declarative/qmlparser/propertyValueSource.qml b/tests/auto/declarative/qmlparser/propertyValueSource.qml new file mode 100644 index 0000000..ad71fcf --- /dev/null +++ b/tests/auto/declarative/qmlparser/propertyValueSource.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + intProperty : MyPropertyValueSource {} +} diff --git a/tests/auto/declarative/qmlparser/propertyValueSource.txt b/tests/auto/declarative/qmlparser/propertyValueSource.txt deleted file mode 100644 index ad71fcf..0000000 --- a/tests/auto/declarative/qmlparser/propertyValueSource.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyTypeObject { - intProperty : MyPropertyValueSource {} -} diff --git a/tests/auto/declarative/qmlparser/readOnly.1.qml b/tests/auto/declarative/qmlparser/readOnly.1.qml new file mode 100644 index 0000000..60757bd --- /dev/null +++ b/tests/auto/declarative/qmlparser/readOnly.1.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + readOnlyString: "Hello World" +} diff --git a/tests/auto/declarative/qmlparser/readOnly.1.txt b/tests/auto/declarative/qmlparser/readOnly.1.txt deleted file mode 100644 index 60757bd..0000000 --- a/tests/auto/declarative/qmlparser/readOnly.1.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - readOnlyString: "Hello World" -} diff --git a/tests/auto/declarative/qmlparser/readOnly.2.qml b/tests/auto/declarative/qmlparser/readOnly.2.qml new file mode 100644 index 0000000..8f1633c --- /dev/null +++ b/tests/auto/declarative/qmlparser/readOnly.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + readOnlyString: "Hello" + "World" +} diff --git a/tests/auto/declarative/qmlparser/readOnly.2.txt b/tests/auto/declarative/qmlparser/readOnly.2.txt deleted file mode 100644 index 8f1633c..0000000 --- a/tests/auto/declarative/qmlparser/readOnly.2.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - readOnlyString: "Hello" + "World" -} diff --git a/tests/auto/declarative/qmlparser/rootAsQmlComponent.qml b/tests/auto/declarative/qmlparser/rootAsQmlComponent.qml new file mode 100644 index 0000000..8d72cd3 --- /dev/null +++ b/tests/auto/declarative/qmlparser/rootAsQmlComponent.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainerComponent { + x: 11 + MyQmlObject {} + MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt b/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt deleted file mode 100644 index 8d72cd3..0000000 --- a/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Test 1.0 -MyContainerComponent { - x: 11 - MyQmlObject {} - MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/simpleBindings.qml b/tests/auto/declarative/qmlparser/simpleBindings.qml new file mode 100644 index 0000000..74867b3 --- /dev/null +++ b/tests/auto/declarative/qmlparser/simpleBindings.qml @@ -0,0 +1,18 @@ +import Test 1.0 +MyTypeObject { + id: Me + property int v1: 10 + property int v2: 11 + + property int value1 + property int value2 + property int value3 + property int value4 + + value1: v1 + value2: Me.v1 + value3: v1 + v2 + value4: Math.min(v1, v2) + + objectProperty: Me +} diff --git a/tests/auto/declarative/qmlparser/simpleBindings.txt b/tests/auto/declarative/qmlparser/simpleBindings.txt deleted file mode 100644 index 74867b3..0000000 --- a/tests/auto/declarative/qmlparser/simpleBindings.txt +++ /dev/null @@ -1,18 +0,0 @@ -import Test 1.0 -MyTypeObject { - id: Me - property int v1: 10 - property int v2: 11 - - property int value1 - property int value2 - property int value3 - property int value4 - - value1: v1 - value2: Me.v1 - value3: v1 + v2 - value4: Math.min(v1, v2) - - objectProperty: Me -} diff --git a/tests/auto/declarative/qmlparser/simpleContainer.qml b/tests/auto/declarative/qmlparser/simpleContainer.qml new file mode 100644 index 0000000..c3a795f --- /dev/null +++ b/tests/auto/declarative/qmlparser/simpleContainer.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyContainer { + MyQmlObject {} + MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/simpleContainer.txt b/tests/auto/declarative/qmlparser/simpleContainer.txt deleted file mode 100644 index c3a795f..0000000 --- a/tests/auto/declarative/qmlparser/simpleContainer.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyContainer { - MyQmlObject {} - MyQmlObject {} -} diff --git a/tests/auto/declarative/qmlparser/simpleObject.qml b/tests/auto/declarative/qmlparser/simpleObject.qml new file mode 100644 index 0000000..30c7823 --- /dev/null +++ b/tests/auto/declarative/qmlparser/simpleObject.qml @@ -0,0 +1,2 @@ +import Test 1.0 +MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/simpleObject.txt b/tests/auto/declarative/qmlparser/simpleObject.txt deleted file mode 100644 index 30c7823..0000000 --- a/tests/auto/declarative/qmlparser/simpleObject.txt +++ /dev/null @@ -1,2 +0,0 @@ -import Test 1.0 -MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index 9974ef8..0bac946 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -101,51 +101,51 @@ void tst_qmlparser::errors_data() QTest::addColumn("errorFile"); QTest::addColumn("create"); - QTest::newRow("nonexistantProperty.1") << "nonexistantProperty.1.txt" << "nonexistantProperty.1.errors.txt" << false; - QTest::newRow("nonexistantProperty.2") << "nonexistantProperty.2.txt" << "nonexistantProperty.2.errors.txt" << false; - QTest::newRow("nonexistantProperty.3") << "nonexistantProperty.3.txt" << "nonexistantProperty.3.errors.txt" << false; - QTest::newRow("nonexistantProperty.4") << "nonexistantProperty.4.txt" << "nonexistantProperty.4.errors.txt" << false; - QTest::newRow("nonexistantProperty.5") << "nonexistantProperty.5.txt" << "nonexistantProperty.5.errors.txt" << false; - QTest::newRow("nonexistantProperty.6") << "nonexistantProperty.6.txt" << "nonexistantProperty.6.errors.txt" << false; - - QTest::newRow("wrongType (string for int)") << "wrongType.1.txt" << "wrongType.1.errors.txt" << false; - QTest::newRow("wrongType (int for bool)") << "wrongType.2.txt" << "wrongType.2.errors.txt" << false; - QTest::newRow("wrongType (bad rect)") << "wrongType.3.txt" << "wrongType.3.errors.txt" << false; - - QTest::newRow("wrongType (invalid enum)") << "wrongType.4.txt" << "wrongType.4.errors.txt" << false; - QTest::newRow("wrongType (int for uint)") << "wrongType.5.txt" << "wrongType.5.errors.txt" << false; - QTest::newRow("wrongType (string for real)") << "wrongType.6.txt" << "wrongType.6.errors.txt" << false; - QTest::newRow("wrongType (int for color)") << "wrongType.7.txt" << "wrongType.7.errors.txt" << false; - QTest::newRow("wrongType (int for date)") << "wrongType.8.txt" << "wrongType.8.errors.txt" << false; - QTest::newRow("wrongType (int for time)") << "wrongType.9.txt" << "wrongType.9.errors.txt" << false; - QTest::newRow("wrongType (int for datetime)") << "wrongType.10.txt" << "wrongType.10.errors.txt" << false; - QTest::newRow("wrongType (string for point)") << "wrongType.11.txt" << "wrongType.11.errors.txt" << false; - QTest::newRow("wrongType (color for size)") << "wrongType.12.txt" << "wrongType.12.errors.txt" << false; - QTest::newRow("wrongType (number string for int)") << "wrongType.13.txt" << "wrongType.13.errors.txt" << false; - QTest::newRow("wrongType (int for string)") << "wrongType.14.txt" << "wrongType.14.errors.txt" << false; - - QTest::newRow("readOnly.1") << "readOnly.1.txt" << "readOnly.1.errors.txt" << false; - QTest::newRow("readOnly.2") << "readOnly.2.txt" << "readOnly.2.errors.txt" << false; - - QTest::newRow("listAssignment.1") << "listAssignment.1.txt" << "listAssignment.1.errors.txt" << false; - QTest::newRow("listAssignment.2") << "listAssignment.2.txt" << "listAssignment.2.errors.txt" << false; - QTest::newRow("listAssignment.3") << "listAssignment.3.txt" << "listAssignment.3.errors.txt" << false; - - QTest::newRow("invalidID.1") << "invalidID.txt" << "invalidID.errors.txt" << false; - QTest::newRow("invalidID.2") << "invalidID.2.txt" << "invalidID.2.errors.txt" << false; - QTest::newRow("invalidID.3") << "invalidID.3.txt" << "invalidID.3.errors.txt" << false; - QTest::newRow("invalidID.4") << "invalidID.4.txt" << "invalidID.4.errors.txt" << false; - - QTest::newRow("unsupportedProperty") << "unsupportedProperty.txt" << "unsupportedProperty.errors.txt" << false; - QTest::newRow("nullDotProperty") << "nullDotProperty.txt" << "nullDotProperty.errors.txt" << true; - QTest::newRow("fakeDotProperty") << "fakeDotProperty.txt" << "fakeDotProperty.errors.txt" << false; - QTest::newRow("duplicateIDs") << "duplicateIDs.txt" << "duplicateIDs.errors.txt" << false; - QTest::newRow("unregisteredObject") << "unregisteredObject.txt" << "unregisteredObject.errors.txt" << false; - QTest::newRow("empty") << "empty.txt" << "empty.errors.txt" << false; - QTest::newRow("missingObject") << "missingObject.txt" << "missingObject.errors.txt" << false; - QTest::newRow("failingComponent") << "failingComponent.txt" << "failingComponent.errors.txt" << false; - QTest::newRow("missingSignal") << "missingSignal.txt" << "missingSignal.errors.txt" << false; - QTest::newRow("finalOverride") << "finalOverride.txt" << "finalOverride.errors.txt" << false; + QTest::newRow("nonexistantProperty.1") << "nonexistantProperty.1.qml" << "nonexistantProperty.1.errors.txt" << false; + QTest::newRow("nonexistantProperty.2") << "nonexistantProperty.2.qml" << "nonexistantProperty.2.errors.txt" << false; + QTest::newRow("nonexistantProperty.3") << "nonexistantProperty.3.qml" << "nonexistantProperty.3.errors.txt" << false; + QTest::newRow("nonexistantProperty.4") << "nonexistantProperty.4.qml" << "nonexistantProperty.4.errors.txt" << false; + QTest::newRow("nonexistantProperty.5") << "nonexistantProperty.5.qml" << "nonexistantProperty.5.errors.txt" << false; + QTest::newRow("nonexistantProperty.6") << "nonexistantProperty.6.qml" << "nonexistantProperty.6.errors.txt" << false; + + QTest::newRow("wrongType (string for int)") << "wrongType.1.qml" << "wrongType.1.errors.txt" << false; + QTest::newRow("wrongType (int for bool)") << "wrongType.2.qml" << "wrongType.2.errors.txt" << false; + QTest::newRow("wrongType (bad rect)") << "wrongType.3.qml" << "wrongType.3.errors.txt" << false; + + QTest::newRow("wrongType (invalid enum)") << "wrongType.4.qml" << "wrongType.4.errors.txt" << false; + QTest::newRow("wrongType (int for uint)") << "wrongType.5.qml" << "wrongType.5.errors.txt" << false; + QTest::newRow("wrongType (string for real)") << "wrongType.6.qml" << "wrongType.6.errors.txt" << false; + QTest::newRow("wrongType (int for color)") << "wrongType.7.qml" << "wrongType.7.errors.txt" << false; + QTest::newRow("wrongType (int for date)") << "wrongType.8.qml" << "wrongType.8.errors.txt" << false; + QTest::newRow("wrongType (int for time)") << "wrongType.9.qml" << "wrongType.9.errors.txt" << false; + QTest::newRow("wrongType (int for datetime)") << "wrongType.10.qml" << "wrongType.10.errors.txt" << false; + QTest::newRow("wrongType (string for point)") << "wrongType.11.qml" << "wrongType.11.errors.txt" << false; + QTest::newRow("wrongType (color for size)") << "wrongType.12.qml" << "wrongType.12.errors.txt" << false; + QTest::newRow("wrongType (number string for int)") << "wrongType.13.qml" << "wrongType.13.errors.txt" << false; + QTest::newRow("wrongType (int for string)") << "wrongType.14.qml" << "wrongType.14.errors.txt" << false; + + QTest::newRow("readOnly.1") << "readOnly.1.qml" << "readOnly.1.errors.txt" << false; + QTest::newRow("readOnly.2") << "readOnly.2.qml" << "readOnly.2.errors.txt" << false; + + QTest::newRow("listAssignment.1") << "listAssignment.1.qml" << "listAssignment.1.errors.txt" << false; + QTest::newRow("listAssignment.2") << "listAssignment.2.qml" << "listAssignment.2.errors.txt" << false; + QTest::newRow("listAssignment.3") << "listAssignment.3.qml" << "listAssignment.3.errors.txt" << false; + + QTest::newRow("invalidID.1") << "invalidID.qml" << "invalidID.errors.txt" << false; + QTest::newRow("invalidID.2") << "invalidID.2.qml" << "invalidID.2.errors.txt" << false; + QTest::newRow("invalidID.3") << "invalidID.3.qml" << "invalidID.3.errors.txt" << false; + QTest::newRow("invalidID.4") << "invalidID.4.qml" << "invalidID.4.errors.txt" << false; + + QTest::newRow("unsupportedProperty") << "unsupportedProperty.qml" << "unsupportedProperty.errors.txt" << false; + QTest::newRow("nullDotProperty") << "nullDotProperty.qml" << "nullDotProperty.errors.txt" << true; + QTest::newRow("fakeDotProperty") << "fakeDotProperty.qml" << "fakeDotProperty.errors.txt" << false; + QTest::newRow("duplicateIDs") << "duplicateIDs.qml" << "duplicateIDs.errors.txt" << false; + QTest::newRow("unregisteredObject") << "unregisteredObject.qml" << "unregisteredObject.errors.txt" << false; + QTest::newRow("empty") << "empty.qml" << "empty.errors.txt" << false; + QTest::newRow("missingObject") << "missingObject.qml" << "missingObject.errors.txt" << false; + QTest::newRow("failingComponent") << "failingComponent.qml" << "failingComponent.errors.txt" << false; + QTest::newRow("missingSignal") << "missingSignal.qml" << "missingSignal.errors.txt" << false; + QTest::newRow("finalOverride") << "finalOverride.qml" << "finalOverride.errors.txt" << false; } void tst_qmlparser::errors() @@ -166,7 +166,7 @@ void tst_qmlparser::errors() void tst_qmlparser::simpleObject() { - QmlComponent component(&engine, TEST_FILE("simpleObject.txt")); + QmlComponent component(&engine, TEST_FILE("simpleObject.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -174,7 +174,7 @@ void tst_qmlparser::simpleObject() void tst_qmlparser::simpleContainer() { - QmlComponent component(&engine, TEST_FILE("simpleContainer.txt")); + QmlComponent component(&engine, TEST_FILE("simpleContainer.qml")); VERIFY_ERRORS(0); MyContainer *container= qobject_cast(component.create()); QVERIFY(container != 0); @@ -183,7 +183,7 @@ void tst_qmlparser::simpleContainer() void tst_qmlparser::interfaceProperty() { - QmlComponent component(&engine, TEST_FILE("interfaceProperty.txt")); + QmlComponent component(&engine, TEST_FILE("interfaceProperty.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -193,7 +193,7 @@ void tst_qmlparser::interfaceProperty() void tst_qmlparser::interfaceQmlList() { - QmlComponent component(&engine, TEST_FILE("interfaceQmlList.txt")); + QmlComponent component(&engine, TEST_FILE("interfaceQmlList.qml")); VERIFY_ERRORS(0); MyContainer *container= qobject_cast(component.create()); QVERIFY(container != 0); @@ -204,7 +204,7 @@ void tst_qmlparser::interfaceQmlList() void tst_qmlparser::interfaceQList() { - QmlComponent component(&engine, TEST_FILE("interfaceQList.txt")); + QmlComponent component(&engine, TEST_FILE("interfaceQList.qml")); VERIFY_ERRORS(0); MyContainer *container= qobject_cast(component.create()); QVERIFY(container != 0); @@ -215,7 +215,7 @@ void tst_qmlparser::interfaceQList() void tst_qmlparser::assignObjectToSignal() { - QmlComponent component(&engine, TEST_FILE("assignObjectToSignal.txt")); + QmlComponent component(&engine, TEST_FILE("assignObjectToSignal.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -225,7 +225,7 @@ void tst_qmlparser::assignObjectToSignal() void tst_qmlparser::assignObjectToVariant() { - QmlComponent component(&engine, TEST_FILE("assignObjectToVariant.txt")); + QmlComponent component(&engine, TEST_FILE("assignObjectToVariant.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -235,7 +235,7 @@ void tst_qmlparser::assignObjectToVariant() void tst_qmlparser::assignLiteralSignalProperty() { - QmlComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.txt")); + QmlComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -245,7 +245,7 @@ void tst_qmlparser::assignLiteralSignalProperty() // Test is an external component can be loaded and assigned (to a qlist) void tst_qmlparser::assignQmlComponent() { - QmlComponent component(&engine, TEST_FILE("assignQmlComponent.txt")); + QmlComponent component(&engine, TEST_FILE("assignQmlComponent.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -258,7 +258,7 @@ void tst_qmlparser::assignQmlComponent() // Test literal assignment to all the basic types void tst_qmlparser::assignBasicTypes() { - QmlComponent component(&engine, TEST_FILE("assignBasicTypes.txt")); + QmlComponent component(&engine, TEST_FILE("assignBasicTypes.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -290,7 +290,7 @@ void tst_qmlparser::assignBasicTypes() // Test edge case type assignments void tst_qmlparser::assignTypeExtremes() { - QmlComponent component(&engine, TEST_FILE("assignTypeExtremes.txt")); + QmlComponent component(&engine, TEST_FILE("assignTypeExtremes.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -301,7 +301,7 @@ void tst_qmlparser::assignTypeExtremes() // Tests that custom parser tyeps can be instantiated void tst_qmlparser::customParserTypes() { - QmlComponent component(&engine, TEST_FILE("customParserTypes.txt")); + QmlComponent component(&engine, TEST_FILE("customParserTypes.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -311,7 +311,7 @@ void tst_qmlparser::customParserTypes() // Tests that the root item can be a custom component void tst_qmlparser::rootAsQmlComponent() { - QmlComponent component(&engine, TEST_FILE("rootAsQmlComponent.txt")); + QmlComponent component(&engine, TEST_FILE("rootAsQmlComponent.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -322,7 +322,7 @@ void tst_qmlparser::rootAsQmlComponent() // Tests that components can be specified inline void tst_qmlparser::inlineQmlComponents() { - QmlComponent component(&engine, TEST_FILE("inlineQmlComponents.txt")); + QmlComponent component(&engine, TEST_FILE("inlineQmlComponents.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -337,7 +337,7 @@ void tst_qmlparser::inlineQmlComponents() // Tests that types that have an id property have it set void tst_qmlparser::idProperty() { - QmlComponent component(&engine, TEST_FILE("idProperty.txt")); + QmlComponent component(&engine, TEST_FILE("idProperty.qml")); VERIFY_ERRORS(0); MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -352,7 +352,7 @@ void tst_qmlparser::idProperty() // Tests that signals can be assigned to void tst_qmlparser::assignSignal() { - QmlComponent component(&engine, TEST_FILE("assignSignal.txt")); + QmlComponent component(&engine, TEST_FILE("assignSignal.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -363,7 +363,7 @@ void tst_qmlparser::assignSignal() // Tests the creation and assignment of dynamic properties void tst_qmlparser::dynamicProperties() { - QmlComponent component(&engine, TEST_FILE("dynamicProperties.txt")); + QmlComponent component(&engine, TEST_FILE("dynamicProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -381,7 +381,7 @@ void tst_qmlparser::dynamicProperties() // Tests the declaration of dynamic signals and slots void tst_qmlparser::dynamicSignalsAndSlots() { - QmlComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.txt")); + QmlComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -393,7 +393,7 @@ void tst_qmlparser::dynamicSignalsAndSlots() void tst_qmlparser::simpleBindings() { - QmlComponent component(&engine, TEST_FILE("simpleBindings.txt")); + QmlComponent component(&engine, TEST_FILE("simpleBindings.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -406,7 +406,7 @@ void tst_qmlparser::simpleBindings() void tst_qmlparser::autoComponentCreation() { - QmlComponent component(&engine, TEST_FILE("autoComponentCreation.txt")); + QmlComponent component(&engine, TEST_FILE("autoComponentCreation.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -418,7 +418,7 @@ void tst_qmlparser::autoComponentCreation() void tst_qmlparser::propertyValueSource() { - QmlComponent component(&engine, TEST_FILE("propertyValueSource.txt")); + QmlComponent component(&engine, TEST_FILE("propertyValueSource.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -434,7 +434,7 @@ void tst_qmlparser::propertyValueSource() void tst_qmlparser::attachedProperties() { - QmlComponent component(&engine, TEST_FILE("attachedProperties.txt")); + QmlComponent component(&engine, TEST_FILE("attachedProperties.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -446,7 +446,7 @@ void tst_qmlparser::attachedProperties() // Tests non-static object properties void tst_qmlparser::dynamicObjects() { - QmlComponent component(&engine, TEST_FILE("dynamicObject.1.txt")); + QmlComponent component(&engine, TEST_FILE("dynamicObject.1.qml")); VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); @@ -455,7 +455,7 @@ void tst_qmlparser::dynamicObjects() // Tests the registration of custom variant string converters void tst_qmlparser::customVariantTypes() { - QmlComponent component(&engine, TEST_FILE("customVariantTypes.txt")); + QmlComponent component(&engine, TEST_FILE("customVariantTypes.qml")); VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -464,7 +464,7 @@ void tst_qmlparser::customVariantTypes() void tst_qmlparser::valueTypes() { - QmlComponent component(&engine, TEST_FILE("valueTypes.txt")); + QmlComponent component(&engine, TEST_FILE("valueTypes.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -639,7 +639,7 @@ void tst_qmlparser::imports() QFETCH(QString, qml); QFETCH(QString, type); - QmlComponent component(&engine, qml.toUtf8(), TEST_FILE("empty.txt")); // just a file for relative local imports + QmlComponent component(&engine, qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports if (type.isEmpty()) { QVERIFY(component.isError()); diff --git a/tests/auto/declarative/qmlparser/unregisteredObject.qml b/tests/auto/declarative/qmlparser/unregisteredObject.qml new file mode 100644 index 0000000..9498e31 --- /dev/null +++ b/tests/auto/declarative/qmlparser/unregisteredObject.qml @@ -0,0 +1,2 @@ +import Test 1.0 +UnregisteredObject {} diff --git a/tests/auto/declarative/qmlparser/unregisteredObject.txt b/tests/auto/declarative/qmlparser/unregisteredObject.txt deleted file mode 100644 index 9498e31..0000000 --- a/tests/auto/declarative/qmlparser/unregisteredObject.txt +++ /dev/null @@ -1,2 +0,0 @@ -import Test 1.0 -UnregisteredObject {} diff --git a/tests/auto/declarative/qmlparser/unsupportedProperty.qml b/tests/auto/declarative/qmlparser/unsupportedProperty.qml new file mode 100644 index 0000000..9f19680 --- /dev/null +++ b/tests/auto/declarative/qmlparser/unsupportedProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + matrix: "1,0,0,0,1,0,0,0,1" +} diff --git a/tests/auto/declarative/qmlparser/unsupportedProperty.txt b/tests/auto/declarative/qmlparser/unsupportedProperty.txt deleted file mode 100644 index 9f19680..0000000 --- a/tests/auto/declarative/qmlparser/unsupportedProperty.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - matrix: "1,0,0,0,1,0,0,0,1" -} diff --git a/tests/auto/declarative/qmlparser/valueTypes.qml b/tests/auto/declarative/qmlparser/valueTypes.qml new file mode 100644 index 0000000..bf325a7 --- /dev/null +++ b/tests/auto/declarative/qmlparser/valueTypes.qml @@ -0,0 +1,13 @@ +import Test 1.0 +MyTypeObject { + rectProperty.x: 10 + rectProperty.y: 11 + rectProperty.width: rectProperty.x + 2 + rectProperty.height: 13 + + intProperty: rectProperty.x + + onAction: { var a = rectProperty; a.x = 12; } + + rectProperty2: rectProperty +} diff --git a/tests/auto/declarative/qmlparser/valueTypes.txt b/tests/auto/declarative/qmlparser/valueTypes.txt deleted file mode 100644 index bf325a7..0000000 --- a/tests/auto/declarative/qmlparser/valueTypes.txt +++ /dev/null @@ -1,13 +0,0 @@ -import Test 1.0 -MyTypeObject { - rectProperty.x: 10 - rectProperty.y: 11 - rectProperty.width: rectProperty.x + 2 - rectProperty.height: 13 - - intProperty: rectProperty.x - - onAction: { var a = rectProperty; a.x = 12; } - - rectProperty2: rectProperty -} diff --git a/tests/auto/declarative/qmlparser/wrongType.1.qml b/tests/auto/declarative/qmlparser/wrongType.1.qml new file mode 100644 index 0000000..289d37f --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.1.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value: "hello" +} diff --git a/tests/auto/declarative/qmlparser/wrongType.1.txt b/tests/auto/declarative/qmlparser/wrongType.1.txt deleted file mode 100644 index 289d37f..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.1.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - value: "hello" -} diff --git a/tests/auto/declarative/qmlparser/wrongType.10.qml b/tests/auto/declarative/qmlparser/wrongType.10.qml new file mode 100644 index 0000000..2cf0e50 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.10.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + dateTimeProperty: 12 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.10.txt b/tests/auto/declarative/qmlparser/wrongType.10.txt deleted file mode 100644 index 2cf0e50..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.10.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - dateTimeProperty: 12 -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.11.qml b/tests/auto/declarative/qmlparser/wrongType.11.qml new file mode 100644 index 0000000..ae77ba1 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.11.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + pointProperty: "apples" +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.11.txt b/tests/auto/declarative/qmlparser/wrongType.11.txt deleted file mode 100644 index ae77ba1..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.11.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - pointProperty: "apples" -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.12.qml b/tests/auto/declarative/qmlparser/wrongType.12.qml new file mode 100644 index 0000000..b7a366f --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.12.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + sizeProperty: "red" +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.12.txt b/tests/auto/declarative/qmlparser/wrongType.12.txt deleted file mode 100644 index b7a366f..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.12.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - sizeProperty: "red" -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.13.qml b/tests/auto/declarative/qmlparser/wrongType.13.qml new file mode 100644 index 0000000..477aff1 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.13.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value: "12" +} diff --git a/tests/auto/declarative/qmlparser/wrongType.13.txt b/tests/auto/declarative/qmlparser/wrongType.13.txt deleted file mode 100644 index 477aff1..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.13.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - value: "12" -} diff --git a/tests/auto/declarative/qmlparser/wrongType.14.qml b/tests/auto/declarative/qmlparser/wrongType.14.qml new file mode 100644 index 0000000..672d693 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.14.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + stringProperty: 10 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.14.txt b/tests/auto/declarative/qmlparser/wrongType.14.txt deleted file mode 100644 index 672d693..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.14.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - stringProperty: 10 -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.2.qml b/tests/auto/declarative/qmlparser/wrongType.2.qml new file mode 100644 index 0000000..34b74f7 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + enabled: 5 +} diff --git a/tests/auto/declarative/qmlparser/wrongType.2.txt b/tests/auto/declarative/qmlparser/wrongType.2.txt deleted file mode 100644 index 34b74f7..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.2.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - enabled: 5 -} diff --git a/tests/auto/declarative/qmlparser/wrongType.3.qml b/tests/auto/declarative/qmlparser/wrongType.3.qml new file mode 100644 index 0000000..384181a --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.3.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + rect: "5,5x10" +} diff --git a/tests/auto/declarative/qmlparser/wrongType.3.txt b/tests/auto/declarative/qmlparser/wrongType.3.txt deleted file mode 100644 index 384181a..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.3.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyQmlObject { - rect: "5,5x10" -} diff --git a/tests/auto/declarative/qmlparser/wrongType.4.qml b/tests/auto/declarative/qmlparser/wrongType.4.qml new file mode 100644 index 0000000..0787bf5 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.4.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + enumProperty: "InvalidEnumName" +} diff --git a/tests/auto/declarative/qmlparser/wrongType.4.txt b/tests/auto/declarative/qmlparser/wrongType.4.txt deleted file mode 100644 index 0787bf5..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.4.txt +++ /dev/null @@ -1,4 +0,0 @@ -import Test 1.0 -MyTypeObject { - enumProperty: "InvalidEnumName" -} diff --git a/tests/auto/declarative/qmlparser/wrongType.5.qml b/tests/auto/declarative/qmlparser/wrongType.5.qml new file mode 100644 index 0000000..c50ae9a --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.5.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + uintProperty: -13 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.5.txt b/tests/auto/declarative/qmlparser/wrongType.5.txt deleted file mode 100644 index c50ae9a..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.5.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - uintProperty: -13 -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.6.qml b/tests/auto/declarative/qmlparser/wrongType.6.qml new file mode 100644 index 0000000..da10b78 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.6.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + realProperty: "Hello" +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.6.txt b/tests/auto/declarative/qmlparser/wrongType.6.txt deleted file mode 100644 index da10b78..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.6.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - realProperty: "Hello" -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.7.qml b/tests/auto/declarative/qmlparser/wrongType.7.qml new file mode 100644 index 0000000..ddc3835 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.7.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + colorProperty: 12 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.7.txt b/tests/auto/declarative/qmlparser/wrongType.7.txt deleted file mode 100644 index ddc3835..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.7.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - colorProperty: 12 -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.8.qml b/tests/auto/declarative/qmlparser/wrongType.8.qml new file mode 100644 index 0000000..a5f6756 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.8.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + dateProperty: 12 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.8.txt b/tests/auto/declarative/qmlparser/wrongType.8.txt deleted file mode 100644 index a5f6756..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.8.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - dateProperty: 12 -} - diff --git a/tests/auto/declarative/qmlparser/wrongType.9.qml b/tests/auto/declarative/qmlparser/wrongType.9.qml new file mode 100644 index 0000000..a3db732 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.9.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + timeProperty: 12 +} + diff --git a/tests/auto/declarative/qmlparser/wrongType.9.txt b/tests/auto/declarative/qmlparser/wrongType.9.txt deleted file mode 100644 index a3db732..0000000 --- a/tests/auto/declarative/qmlparser/wrongType.9.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 -MyTypeObject { - timeProperty: 12 -} - -- cgit v0.12 From 184cc9528b4361b3c60025a1610fd88e3eb5895d Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 21 Aug 2009 16:22:42 +1000 Subject: update --- tests/auto/declarative/qmlparser/dynamicObject.1.qml | 2 +- .../declarative/qmlparser/lib/com/nokia/installedtest/InstalledTest.qml | 2 +- tests/auto/declarative/qmlparser/subdir/Test.qml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qmlparser/subdir/Test.qml diff --git a/tests/auto/declarative/qmlparser/dynamicObject.1.qml b/tests/auto/declarative/qmlparser/dynamicObject.1.qml index 4be0c8d..85d1052 100644 --- a/tests/auto/declarative/qmlparser/dynamicObject.1.qml +++ b/tests/auto/declarative/qmlparser/dynamicObject.1.qml @@ -1,6 +1,6 @@ import Test 1.0 import Qt 4.6 -SetProperties { +PropertyChanges { propa: a + 10 propb: Math.min(a, 10) propc: MyPropertyValueSource {} diff --git a/tests/auto/declarative/qmlparser/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/declarative/qmlparser/lib/com/nokia/installedtest/InstalledTest.qml index 65f0276..d8a22a8 100644 --- a/tests/auto/declarative/qmlparser/lib/com/nokia/installedtest/InstalledTest.qml +++ b/tests/auto/declarative/qmlparser/lib/com/nokia/installedtest/InstalledTest.qml @@ -1,2 +1,2 @@ import Qt 4.6 -Rect {} +Rectangle {} diff --git a/tests/auto/declarative/qmlparser/subdir/Test.qml b/tests/auto/declarative/qmlparser/subdir/Test.qml new file mode 100644 index 0000000..c4d5905 --- /dev/null +++ b/tests/auto/declarative/qmlparser/subdir/Test.qml @@ -0,0 +1,2 @@ +import Qt 4.6 +Rectangle { } -- cgit v0.12 From 715056fe9939452c0223f5d8ff217bed3b8015de Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 21 Aug 2009 09:55:17 +0200 Subject: Doc fix (Rect->Rectangle) --- src/declarative/fx/qfxitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 83b4eb5..d78e096 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -88,7 +88,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) it allows a different scale for the x and y axes, and allows the scale to be relative to an arbitrary point. - The following example scales the X axis of the Rect, relative to its interior point 25, 25: + The following example scales the X axis of the Rectangle, relative to its interior point 25, 25: \qml Rectangle { width: 100; height: 100 @@ -121,7 +121,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) \qmlclass Rotation \brief A Rotation object provides a way to rotate an Item around a point using an axis in 3D space. - The following example rotates a Rect around its interior point 25, 25: + The following example rotates a Rectangle around its interior point 25, 25: \qml Rectangle { width: 100; height: 100 -- cgit v0.12 From bf04e19750502ea6346eb6eac08a6370b11dd0e3 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 21 Aug 2009 13:15:28 +0200 Subject: Store location information for "Type XXX is not available" messages QmlScriptParser now also stores the locations where a specific type was referenced. --- src/declarative/qml/qmlcompiler.cpp | 11 ++++++-- src/declarative/qml/qmlcompositetypedata_p.h | 2 +- src/declarative/qml/qmlcompositetypemanager.cpp | 21 ++++++++++----- src/declarative/qml/qmlscriptparser.cpp | 34 ++++++++++++++++--------- src/declarative/qml/qmlscriptparser_p.h | 18 ++++++++++--- 5 files changed, 61 insertions(+), 25 deletions(-) diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 1fb4b46..1771cb4 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -569,6 +569,7 @@ bool QmlCompiler::compile(QmlEngine *engine, for (int ii = 0; ii < unit->types.count(); ++ii) { QmlCompositeTypeData::TypeReference &tref = unit->types[ii]; QmlCompiledData::TypeReference ref; + QmlScriptParser::TypeReference *parserRef = unit->data.referencedTypes().at(ii); if (tref.type) ref.type = tref.type; else if (tref.unit) { @@ -578,7 +579,13 @@ bool QmlCompiler::compile(QmlEngine *engine, QmlError error; error.setUrl(output->url); error.setDescription(QLatin1String("Unable to create type ") + - unit->data.types().at(ii)); + parserRef->name); + if (!parserRef->refObjects.isEmpty()) { + QmlParser::Object *parserObject = parserRef->refObjects.first(); + error.setLine(parserObject->location.start.line); + error.setColumn(parserObject->location.start.column); + } + exceptions << error; exceptions << ref.component->errors(); reset(out); @@ -587,7 +594,7 @@ bool QmlCompiler::compile(QmlEngine *engine, ref.ref = tref.unit; ref.ref->addref(); } - ref.className = unit->data.types().at(ii).toLatin1(); + ref.className = parserRef->name.toLatin1(); out->types << ref; } diff --git a/src/declarative/qml/qmlcompositetypedata_p.h b/src/declarative/qml/qmlcompositetypedata_p.h index 3469fea..54933c4 100644 --- a/src/declarative/qml/qmlcompositetypedata_p.h +++ b/src/declarative/qml/qmlcompositetypedata_p.h @@ -91,7 +91,7 @@ struct QmlCompositeTypeData : public QmlRefCount // occurs QmlCompiledData *toCompiledComponent(QmlEngine *); - struct TypeReference + struct TypeReference { TypeReference(); diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp index 97391e6..0fb6c86 100644 --- a/src/declarative/qml/qmlcompositetypemanager.cpp +++ b/src/declarative/qml/qmlcompositetypemanager.cpp @@ -311,21 +311,23 @@ void QmlCompositeTypeManager::checkComplete(QmlCompositeTypeData *unit) void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) { - QStringList typeNames = unit->data.types(); + QList types = unit->data.referencedTypes(); int waiting = 0; - for (int ii = 0; ii < typeNames.count(); ++ii) { - QByteArray type = typeNames.at(ii).toLatin1(); + for (int ii = 0; ii < types.count(); ++ii) { + QmlScriptParser::TypeReference *parserRef = types.at(ii); + QByteArray typeName = parserRef->name.toLatin1(); QmlCompositeTypeData::TypeReference ref; - if (type == QByteArray("Property") || - type == QByteArray("Signal")) { + + if (typeName == QByteArray("Property") || + typeName == QByteArray("Signal")) { unit->types << ref; continue; } QUrl url; - if (!QmlEnginePrivate::get(engine)->resolveType(unit->imports, type, &ref.type, &url)) { + if (!QmlEnginePrivate::get(engine)->resolveType(unit->imports, typeName, &ref.type, &url)) { // XXX could produce error message here. } @@ -353,7 +355,12 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) { QmlError error; error.setUrl(unit->imports.baseUrl()); - error.setDescription(tr("Type %1 unavailable").arg(QLatin1String(type))); + error.setDescription(tr("Type %1 unavailable").arg(QLatin1String(typeName))); + if (!parserRef->refObjects.isEmpty()) { + QmlParser::Object *obj = parserRef->refObjects.first(); + error.setLine(obj->location.start.line); + error.setColumn(obj->location.start.column); + } unit->errors << error; } if (urlUnit->errorType != QmlCompositeTypeData::AccessError) diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 2f82f0d..187f640 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -288,10 +288,13 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, QString resolvableObjectType = objectType; if (lastTypeDot >= 0) resolvableObjectType.replace(QLatin1Char('.'),QLatin1Char('/')); - const int typeId = _parser->findOrCreateTypeId(resolvableObjectType); + + QmlScriptParser::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType); Object *obj = new Object; - obj->type = typeId; + obj->type = typeRef->id; + + typeRef->refObjects.append(obj); // XXX this doesn't do anything (_scope never builds up) _scope.append(resolvableObjectType); @@ -802,9 +805,9 @@ bool QmlScriptParser::parse(const QByteArray &qmldata, const QUrl &url) return _errors.isEmpty(); } -QStringList QmlScriptParser::types() const +QList QmlScriptParser::referencedTypes() const { - return _typeNames; + return _refTypes; } Object *QmlScriptParser::tree() const @@ -828,7 +831,8 @@ void QmlScriptParser::clear() root->release(); root = 0; } - _typeNames.clear(); + qDeleteAll(_refTypes); + _refTypes.clear(); _errors.clear(); if (data) { @@ -837,16 +841,22 @@ void QmlScriptParser::clear() } } -int QmlScriptParser::findOrCreateTypeId(const QString &name) +QmlScriptParser::TypeReference *QmlScriptParser::findOrCreateType(const QString &name) { - int index = _typeNames.indexOf(name); - - if (index == -1) { - index = _typeNames.size(); - _typeNames.append(name); + TypeReference *type = 0; + int i = 0; + for (; i < _refTypes.size(); ++i) { + if (_refTypes.at(i)->name == name) { + type = _refTypes.at(i); + break; + } + } + if (!type) { + type = new TypeReference(i, name); + _refTypes.append(type); } - return index; + return type; } void QmlScriptParser::setTree(Object *tree) diff --git a/src/declarative/qml/qmlscriptparser_p.h b/src/declarative/qml/qmlscriptparser_p.h index 355ff75..d489610 100644 --- a/src/declarative/qml/qmlscriptparser_p.h +++ b/src/declarative/qml/qmlscriptparser_p.h @@ -84,12 +84,24 @@ public: QmlParser::LocationSpan location; }; + class TypeReference + { + public: + TypeReference(int typeId, const QString &typeName) : id(typeId), name(typeName) {} + + int id; + // type as it has been referenced in Qml + QString name; + // objects in parse tree referencing the type + QList refObjects; + }; + QmlScriptParser(); ~QmlScriptParser(); bool parse(const QByteArray &data, const QUrl &url = QUrl()); - QStringList types() const; + QList referencedTypes() const; QmlParser::Object *tree() const; QList imports() const; @@ -99,7 +111,7 @@ public: QList errors() const; // ### private: - int findOrCreateTypeId(const QString &name); + TypeReference *findOrCreateType(const QString &name); void setTree(QmlParser::Object *tree); void setScriptFile(const QString &filename) {_scriptFile = filename; } @@ -110,7 +122,7 @@ public: QmlParser::Object *root; QList _imports; - QStringList _typeNames; + QList _refTypes; QString _scriptFile; QmlScriptParserJsASTData *data; }; -- cgit v0.12 From a28f9a0204fcf7ab4ecf7546fc455f5db3aa7387 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 21 Aug 2009 16:22:28 +0200 Subject: Fix qmldom test cases --- tests/auto/declarative/qmldom/tst_qmldom.cpp | 77 ++++++++++++++++------------ 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp index 20419fb..dd02bce 100644 --- a/tests/auto/declarative/qmldom/tst_qmldom.cpp +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -28,7 +28,8 @@ private: void tst_qmldom::loadSimple() { - QByteArray qml = "Item {}"; + QByteArray qml = "import Qt 4.6\n" + "Item {}"; //QByteArray qml = ""; QmlDomDocument document; @@ -39,12 +40,13 @@ void tst_qmldom::loadSimple() QVERIFY(rootObject.isValid()); QVERIFY(!rootObject.isComponent()); QVERIFY(!rootObject.isCustomType()); - QVERIFY(rootObject.objectType() == "Item"); + QVERIFY(rootObject.objectType() == "Qt/Item"); } void tst_qmldom::loadProperties() { - QByteArray qml = "Item { id : item; x : 300; visible : true }"; + QByteArray qml = "import Qt 4.6\n" + "Item { id : item; x : 300; visible : true }"; //QByteArray qml = ""; QmlDomDocument document; @@ -68,7 +70,8 @@ void tst_qmldom::loadProperties() void tst_qmldom::loadChildObject() { - QByteArray qml = "Item { Item {} }"; + QByteArray qml = "import Qt 4.6\n" + "Item { Item {} }"; //QByteArray qml = " "; QmlDomDocument document; @@ -87,7 +90,7 @@ void tst_qmldom::loadChildObject() QmlDomObject childItem = list.values().first().toObject(); QVERIFY(childItem.isValid()); - QVERIFY(childItem.objectType() == "Item"); + QVERIFY(childItem.objectType() == "Qt/Item"); } void tst_qmldom::loadComposite() @@ -113,7 +116,8 @@ void tst_qmldom::loadComposite() void tst_qmldom::testValueSource() { - QByteArray qml = "Rect { height: Follow { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; + QByteArray qml = "import Qt 4.6\n" + "Rectangle { height: Follow { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; QmlEngine freshEngine; QmlDomDocument document; @@ -129,7 +133,7 @@ void tst_qmldom::testValueSource() QmlDomObject valueSourceObject = valueSource.object(); QVERIFY(valueSourceObject.isValid()); - QVERIFY(valueSourceObject.objectType() == "Follow"); + QVERIFY(valueSourceObject.objectType() == "Qt/Follow"); const QmlDomValue springValue = valueSourceObject.property("spring").value(); QVERIFY(!springValue.isInvalid()); @@ -144,7 +148,8 @@ void tst_qmldom::testValueSource() void tst_qmldom::loadImports() { - QByteArray qml = "import importlib.sublib 4.7\n" + QByteArray qml = "import Qt 4.6\n" + "import importlib.sublib 4.7\n" "import importlib.sublib 4.6 as NewFoo\n" "import 'import'\n" "import 'import' as X\n" @@ -155,31 +160,37 @@ void tst_qmldom::loadImports() QmlDomDocument document; QVERIFY(document.load(&engine, qml)); - QCOMPARE(document.imports().size(), 4); - - QmlDomImport import1 = document.imports().at(0); - QCOMPARE(import1.type(), QmlDomImport::Library); - QCOMPARE(import1.uri(), QLatin1String("importlib.sublib")); - QCOMPARE(import1.qualifier(), QString()); - QCOMPARE(import1.version(), QLatin1String("4.7")); - - QmlDomImport import2 = document.imports().at(1); - QCOMPARE(import2.type(), QmlDomImport::Library); - QCOMPARE(import2.uri(), QLatin1String("importlib.sublib")); - QCOMPARE(import2.qualifier(), QLatin1String("NewFoo")); - QCOMPARE(import2.version(), QLatin1String("4.6")); - - QmlDomImport import3 = document.imports().at(2); - QCOMPARE(import3.type(), QmlDomImport::File); - QCOMPARE(import3.uri(), QLatin1String("import")); - QCOMPARE(import3.qualifier(), QLatin1String("")); - QCOMPARE(import3.version(), QLatin1String("")); - - QmlDomImport import4 = document.imports().at(3); - QCOMPARE(import4.type(), QmlDomImport::File); - QCOMPARE(import4.uri(), QLatin1String("import")); - QCOMPARE(import4.qualifier(), QLatin1String("X")); - QCOMPARE(import4.version(), QLatin1String("")); + QCOMPARE(document.imports().size(), 5); + + QmlDomImport import = document.imports().at(0); + QCOMPARE(import.type(), QmlDomImport::Library); + QCOMPARE(import.uri(), QLatin1String("Qt")); + QCOMPARE(import.qualifier(), QString()); + QCOMPARE(import.version(), QLatin1String("4.6")); + + import = document.imports().at(1); + QCOMPARE(import.type(), QmlDomImport::Library); + QCOMPARE(import.uri(), QLatin1String("importlib.sublib")); + QCOMPARE(import.qualifier(), QString()); + QCOMPARE(import.version(), QLatin1String("4.7")); + + import = document.imports().at(2); + QCOMPARE(import.type(), QmlDomImport::Library); + QCOMPARE(import.uri(), QLatin1String("importlib.sublib")); + QCOMPARE(import.qualifier(), QLatin1String("NewFoo")); + QCOMPARE(import.version(), QLatin1String("4.6")); + + import = document.imports().at(3); + QCOMPARE(import.type(), QmlDomImport::File); + QCOMPARE(import.uri(), QLatin1String("import")); + QCOMPARE(import.qualifier(), QLatin1String("")); + QCOMPARE(import.version(), QLatin1String("")); + + import = document.imports().at(4); + QCOMPARE(import.type(), QmlDomImport::File); + QCOMPARE(import.uri(), QLatin1String("import")); + QCOMPARE(import.qualifier(), QLatin1String("X")); + QCOMPARE(import.version(), QLatin1String("")); } -- cgit v0.12 From 3170c89da80feb841b115db28a4dcf5ddadbbded Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 24 Aug 2009 10:07:31 +1000 Subject: fromState -> from, toState -> to for Transition. --- demos/declarative/contacts/Button.qml | 8 ++++---- demos/declarative/contacts/ContactField.qml | 4 ++-- demos/declarative/contacts/FieldText.qml | 4 ++-- demos/declarative/contacts/RemoveButton.qml | 4 ++-- demos/declarative/contacts/contacts.qml | 8 ++++---- demos/declarative/flickr/content/ScrollBar.qml | 4 ++-- demos/declarative/flickr/flickr.qml | 6 +++--- demos/declarative/flickr/flickr2.qml | 8 ++++---- demos/declarative/webbrowser/fieldtext/FieldText.qml | 4 ++-- doc/src/declarative/animation.qdoc | 8 ++++---- doc/src/declarative/tutorial3.qdoc | 10 +++++----- examples/declarative/flowview/flowview.qml | 6 +++--- examples/declarative/scrollbar/display.qml | 4 ++-- examples/declarative/snow/ImageBatch.qml | 4 ++-- examples/declarative/states/transitions.qml | 4 ++-- .../contacts/1_Drawing_and_Animation/5/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/1/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/1a/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/2/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/3/ContactField.qml | 4 ++-- .../declarative/tutorials/contacts/2_Reuse/3/FieldText.qml | 4 ++-- .../tutorials/contacts/2_Reuse/3/RemoveButton.qml | 4 ++-- .../tutorials/contacts/2_Reuse/4/ContactField.qml | 4 ++-- .../declarative/tutorials/contacts/2_Reuse/4/FieldText.qml | 4 ++-- .../tutorials/contacts/2_Reuse/4/RemoveButton.qml | 4 ++-- .../tutorials/contacts/3_Collections/lib/Button.qml | 8 ++++---- .../tutorials/contacts/3_Collections/lib/ContactField.qml | 4 ++-- .../tutorials/contacts/3_Collections/lib/FieldText.qml | 4 ++-- .../tutorials/contacts/3_Collections/lib/RemoveButton.qml | 4 ++-- examples/declarative/tutorials/helloworld/t3/tutorial3.qml | 4 ++-- examples/declarative/xmldata/yahoonews.qml | 4 ++-- src/declarative/util/qmltransition.cpp | 12 ++++++------ src/declarative/util/qmltransition.h | 4 ++-- 34 files changed, 87 insertions(+), 87 deletions(-) diff --git a/demos/declarative/contacts/Button.qml b/demos/declarative/contacts/Button.qml index 476f170..9719231 100644 --- a/demos/declarative/contacts/Button.qml +++ b/demos/declarative/contacts/Button.qml @@ -34,16 +34,16 @@ Item { ] transitions: [ Transition { - fromState: "*" - toState: "pressed" + from: "*" + to: "pressed" ColorAnimation { property: "color" duration: 200 } }, Transition { - fromState: "pressed" - toState: "*" + from: "pressed" + to: "*" ColorAnimation { property: "color" duration: 1000 diff --git a/demos/declarative/contacts/ContactField.qml b/demos/declarative/contacts/ContactField.qml index 8fb627d..6cf7baa 100644 --- a/demos/declarative/contacts/ContactField.qml +++ b/demos/declarative/contacts/ContactField.qml @@ -48,8 +48,8 @@ Item { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "width,rightMargin" diff --git a/demos/declarative/contacts/FieldText.qml b/demos/declarative/contacts/FieldText.qml index 6793b7c..d30d4d8 100644 --- a/demos/declarative/contacts/FieldText.qml +++ b/demos/declarative/contacts/FieldText.qml @@ -138,8 +138,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "opacity,leftMargin,rightMargin" diff --git a/demos/declarative/contacts/RemoveButton.qml b/demos/declarative/contacts/RemoveButton.qml index 2493f65..cc858c3 100644 --- a/demos/declarative/contacts/RemoveButton.qml +++ b/demos/declarative/contacts/RemoveButton.qml @@ -111,8 +111,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml index 3be2b04..ebcab69 100644 --- a/demos/declarative/contacts/contacts.qml +++ b/demos/declarative/contacts/contacts.qml @@ -281,8 +281,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "*" + from: "*" + to: "*" NumberAnimation { property: "bottomMargin" duration: 250 @@ -310,8 +310,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "*" + from: "*" + to: "*" NumberAnimation { property: "opacity" duration: 500 diff --git a/demos/declarative/flickr/content/ScrollBar.qml b/demos/declarative/flickr/content/ScrollBar.qml index 540f94f..89d51e2 100644 --- a/demos/declarative/flickr/content/ScrollBar.qml +++ b/demos/declarative/flickr/content/ScrollBar.qml @@ -28,8 +28,8 @@ Item { ] transitions: [ Transition { - fromState: "*" - toState: "*" + from: "*" + to: "*" NumberAnimation { target: Container properties: "opacity" diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index d3c1a48..d8a27d5 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -100,12 +100,12 @@ Item { transitions: [ Transition { - fromState: "*"; toState: "Details" + from: "*"; to: "Details" ParentAction { } NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing: "easeInOutQuad" } }, Transition { - fromState: "Details"; toState: "*" + from: "Details"; to: "*" SequentialAnimation { ParentAction { } NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing: "easeInOutQuad" } @@ -196,7 +196,7 @@ Item { transitions: [ Transition { - fromState: "*"; toState: "*" + from: "*"; to: "*" NumberAnimation { properties: "y"; duration: 1000; easing: "easeOutBounce(amplitude:0.5)" } } ] diff --git a/demos/declarative/flickr/flickr2.qml b/demos/declarative/flickr/flickr2.qml index 0bdbaaf..d9b1f60 100644 --- a/demos/declarative/flickr/flickr2.qml +++ b/demos/declarative/flickr/flickr2.qml @@ -99,12 +99,12 @@ Item { transitions: [ Transition { - fromState: "*"; toState: "Details" + from: "*"; to: "Details" ParentAction { } NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing: "easeInOutQuad" } }, Transition { - fromState: "Details"; toState: "*" + from: "Details"; to: "*" SequentialAnimation { ParentAction { } NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing: "easeInOutQuad" } @@ -140,7 +140,7 @@ Item { ] transitions: [ Transition { - toState: "pathView" + to: "pathView" SequentialAnimation { PropertyAction { target: Wrapper; property: "moveToParent" } ParallelAnimation { @@ -156,7 +156,7 @@ Item { } }, Transition { - toState: "gridView" + to: "gridView" SequentialAnimation { PauseAnimation { duration: Math.floor(index/7)*100 } PropertyAction { target: Wrapper; property: "moveToParent" } diff --git a/demos/declarative/webbrowser/fieldtext/FieldText.qml b/demos/declarative/webbrowser/fieldtext/FieldText.qml index 4d59705..976785b 100644 --- a/demos/declarative/webbrowser/fieldtext/FieldText.qml +++ b/demos/declarative/webbrowser/fieldtext/FieldText.qml @@ -148,8 +148,8 @@ Item { transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "opacity,leftMargin,rightMargin" diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 28a3c47..9554ad5 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -121,8 +121,8 @@ QML transitions can use selectors to determine which state changes a transition \code Transition { - fromState: "*" - toState: "Details" + from: "*" + to: "Details" ... } \endcode @@ -131,8 +131,8 @@ Transitions can happen in parallel, in sequence, or in any combination of the tw \code Transition { - fromState: "*" - toState: "MyState" + from: "*" + to: "MyState" reversible: true SequentialAnimation { ColorAnimation { diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc index d402a66..1330c43 100644 --- a/doc/src/declarative/tutorial3.qdoc +++ b/doc/src/declarative/tutorial3.qdoc @@ -33,8 +33,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "down" + from: "*" + to: "down" reversible: true ParallelAnimation { NumberAnimation { @@ -82,15 +82,15 @@ The \e down state includes a set of property changes from our implicit \e {defau \code Transition { - fromState: "*" - toState: "down" + from: "*" + to: "down" reversible: true } \endcode Because we don't want the text to appear at the bottom instantly but rather move smoothly, we add a transition between our two states. -\c fromState and \c toState define the states between which the transition will run. In this case, we want a transition from any state to our \e down state. +\c from and \c to define the states between which the transition will run. In this case, we want a transition from any state to our \e down state. Because we want the same transition to be run in reverse when changing back from the \e down state to the default state, we set \c reversible to \c true. This is equivalent to writing the two transitions separately. diff --git a/examples/declarative/flowview/flowview.qml b/examples/declarative/flowview/flowview.qml index e82561e..ca31bcc 100644 --- a/examples/declarative/flowview/flowview.qml +++ b/examples/declarative/flowview/flowview.qml @@ -22,7 +22,7 @@ Rectangle { PropertyChanges { target: RightBar; x: 770 } } transitions: Transition { - fromState: "" ; toState: "rotated" + from: "" ; to: "rotated" reversible: true SequentialAnimation { NumberAnimation { targets: [TopBar, BottomBar]; properties: "x,y"; easing: "easeInOutQuad" } @@ -64,7 +64,7 @@ Rectangle { ] transitions: [ Transition { - fromState: "*"; toState: "InGrid" + from: "*"; to: "InGrid" SequentialAnimation { ParentAction{} PauseAnimation { duration: 50 * List.FlowView.column } @@ -72,7 +72,7 @@ Rectangle { } }, Transition { - fromState: "*"; toState: "InList" + from: "*"; to: "InList" SequentialAnimation { ParentAction{} PauseAnimation { duration: 50 * (Grid.FlowView.row * 2 + Grid.FlowView.column) } diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml index 639a8cc..48cceb7 100644 --- a/examples/declarative/scrollbar/display.qml +++ b/examples/declarative/scrollbar/display.qml @@ -24,8 +24,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "*" + from: "*" + to: "*" NumberAnimation { properties: "opacity" duration: 400 diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml index 17e5a48..021cef3 100644 --- a/examples/declarative/snow/ImageBatch.qml +++ b/examples/declarative/snow/ImageBatch.qml @@ -52,7 +52,7 @@ GridView { } transitions: [ Transition { - toState: "selected" + to: "selected" SequentialAnimation { PauseAnimation { duration: 150 } PropertyAction { properties: "z" } @@ -60,7 +60,7 @@ GridView { } }, Transition { - fromState: "selected" + from: "selected" SequentialAnimation { NumberAnimation { properties: "scale"; duration: 150 } PropertyAction { properties: "z" } diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml index 0be9b01..be1419d 100644 --- a/examples/declarative/states/transitions.qml +++ b/examples/declarative/states/transitions.qml @@ -51,13 +51,13 @@ Rectangle { // When transitioning to 'Position1' move x,y over a duration of 1 second, // with easeOutBounce easing function. Transition { - fromState: "*"; toState: "Position1" + from: "*"; to: "Position1" NumberAnimation { properties: "x,y"; easing: "easeOutBounce"; duration: 1000 } }, // When transitioning to 'Position2' move x,y over a duration of 2 seconds, // with easeInOutQuad easing function. Transition { - fromState: "*"; toState: "Position2" + from: "*"; to: "Position2" NumberAnimation { properties: "x,y"; easing: "easeInOutQuad"; duration: 2000 } }, // For any other state changes move x,y linearly over duration of 200ms. diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml index d75eedc..75d5aaa 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml @@ -101,8 +101,8 @@ Rectangle { //! [transition] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml index de9f15a..5ac62ce 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml @@ -100,8 +100,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml index de9f15a..5ac62ce 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml @@ -100,8 +100,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml index 07a0814..eb694ce 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml @@ -102,8 +102,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml index be5f871..b1cd72e 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml @@ -108,8 +108,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml index 0b9c02a..1517a74 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml @@ -48,8 +48,8 @@ Item { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "width,rightMargin" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml index 8a9424f..3a8bb7f 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml @@ -128,8 +128,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "opacity,leftMargin,rightMargin" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml index fc260e3..1276c6b 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml @@ -103,8 +103,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml index 691918f..ccd756e 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml @@ -46,8 +46,8 @@ Item { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "width,rightMargin" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml index 62fb08f..8f98ede 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml @@ -129,8 +129,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "opacity,leftMargin,rightMargin" diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml index abf8fd9..8938184 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml @@ -108,8 +108,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml index 476f170..9719231 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml @@ -34,16 +34,16 @@ Item { ] transitions: [ Transition { - fromState: "*" - toState: "pressed" + from: "*" + to: "pressed" ColorAnimation { property: "color" duration: 200 } }, Transition { - fromState: "pressed" - toState: "*" + from: "pressed" + to: "*" ColorAnimation { property: "color" duration: 1000 diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml index 691918f..ccd756e 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml @@ -46,8 +46,8 @@ Item { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "width,rightMargin" diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml index e05708f..228a00d 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml @@ -129,8 +129,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "" - toState: "*" + from: "" + to: "*" reversible: true NumberAnimation { properties: "opacity,leftMargin,rightMargin" diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml index 6bca8b9..3c77cd8 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml @@ -107,8 +107,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "opened" + from: "*" + to: "opened" reversible: true NumberAnimation { properties: "opacity,x,width" diff --git a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml index b652eac..daf32d5 100644 --- a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml @@ -25,8 +25,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "down" + from: "*" + to: "down" reversible: true ParallelAnimation { NumberAnimation { diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml index d7d47b1..6395284 100644 --- a/examples/declarative/xmldata/yahoonews.qml +++ b/examples/declarative/xmldata/yahoonews.qml @@ -72,8 +72,8 @@ Rectangle { ] transitions: [ Transition { - fromState: "*" - toState: "Details" + from: "*" + to: "Details" reversible: true SequentialAnimation { NumberAnimation { diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index e70661d..66275d9 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -183,17 +183,17 @@ void QmlTransition::prepare(QmlStateOperation::ActionList &actions, } /*! - \qmlproperty string Transition::fromState - \qmlproperty string Transition::toState + \qmlproperty string Transition::from + \qmlproperty string Transition::to These properties are selectors indicating which state changes should trigger the transition. - fromState is used in conjunction with toState to determine when a transition should - be applied. By default fromState and toState are both "*" (any state). In the following example, + from is used in conjunction with to to determine when a transition should + be applied. By default from and to are both "*" (any state). In the following example, the transition is applied when changing from state1 to state2. \code Transition { - fromState: "state1" - toState: "state2" + from: "state1" + to: "state2" ... } \endcode diff --git a/src/declarative/util/qmltransition.h b/src/declarative/util/qmltransition.h index 39b35ba..b09341d 100644 --- a/src/declarative/util/qmltransition.h +++ b/src/declarative/util/qmltransition.h @@ -61,8 +61,8 @@ class Q_DECLARATIVE_EXPORT QmlTransition : public QObject Q_OBJECT Q_DECLARE_PRIVATE(QmlTransition) - Q_PROPERTY(QString fromState READ fromState WRITE setFromState) - Q_PROPERTY(QString toState READ toState WRITE setToState) + Q_PROPERTY(QString from READ fromState WRITE setFromState) + Q_PROPERTY(QString to READ toState WRITE setToState) Q_PROPERTY(bool reversible READ reversible WRITE setReversible) Q_PROPERTY(QmlList* animations READ animations) Q_CLASSINFO("DefaultProperty", "animations") -- cgit v0.12 From 9c6472491c9d5ac23696767388bdeb8337e2e0ee Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 24 Aug 2009 10:10:11 +1000 Subject: Update changes doc. --- src/declarative/QmlChanges.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 5abf370..da290b7 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -35,6 +35,8 @@ Text elements: hAlign -> horizontalAlignment Text elements: vAlign -> verticalAlignment State: operations -> changes Transition: operations -> animations +Transition: fromState -> from +Transition: toState -> to Follow: followValue -> value Additions: @@ -59,8 +61,6 @@ Pending Changes Renamed elements: Renamed properties: -Transition: fromState -> from -Trnasition: toState -> to Removed Properties: PropertyAction::property -- cgit v0.12 From 89a99fb94e12c6d582537048f3c977fb4d4058a7 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 24 Aug 2009 10:20:16 +1000 Subject: Remove the overhead of string conversion from the vector() built-in Reviewed-by: Aaron Kennedy --- src/declarative/qml/qmlengine.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 7f2a3e1..351bd8a 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -71,6 +71,7 @@ #include #include #include +#include #include #include "private/qmlcomponentjs_p.h" #include "private/qmlmetaproperty_p.h" @@ -727,10 +728,7 @@ QScriptValue QmlEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engin qsreal x = ctxt->argument(0).toNumber(); qsreal y = ctxt->argument(1).toNumber(); qsreal z = ctxt->argument(2).toNumber(); - QString s = QString::number(x) + QLatin1Char(',') + - QString::number(y) + QLatin1Char(',') + - QString::number(z); - return QScriptValue(s); + return engine->newVariant(qVariantFromValue(QVector3D(x, y, z))); } QmlScriptClass::QmlScriptClass(QmlEngine *bindengine) -- cgit v0.12