diff options
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
492 files changed, 2231 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/Alias.qml b/tests/auto/qml/qqmllanguage/data/Alias.qml new file mode 100644 index 0000000000..2cb7cbe2e0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/Alias.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +QtObject { + id: root + property int value: 1892 + property alias aliasValue: root.value +} + diff --git a/tests/auto/qml/qqmllanguage/data/Alias2.qml b/tests/auto/qml/qqmllanguage/data/Alias2.qml new file mode 100644 index 0000000000..134e1440b5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/Alias2.qml @@ -0,0 +1,9 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + property variant other + other: MyTypeObject { id: obj } + property alias enumAlias: obj.enumProperty; +} + diff --git a/tests/auto/qml/qqmllanguage/data/Alias3.qml b/tests/auto/qml/qqmllanguage/data/Alias3.qml new file mode 100644 index 0000000000..54b548e049 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/Alias3.qml @@ -0,0 +1,12 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + property alias obj : otherObj + property variant child + child: QtObject { + id: otherObj + property int myValue: 10 + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/Alias4.qml b/tests/auto/qml/qqmllanguage/data/Alias4.qml new file mode 100644 index 0000000000..e09eca2ff3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/Alias4.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import QtQuick 2.0 + +Alias3 {} + diff --git a/tests/auto/qml/qqmllanguage/data/AliasPropertyChangeSignalsType.qml b/tests/auto/qml/qqmllanguage/data/AliasPropertyChangeSignalsType.qml new file mode 100644 index 0000000000..9265ffb1df --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/AliasPropertyChangeSignalsType.qml @@ -0,0 +1,20 @@ +import QtQuick 2.0 + +QtObject { + id: root + + signal sig1 + signal sig2 + signal sig3 + signal sig4 + + property alias aliasProperty: root.realProperty + + property int realProperty: 0 + + property bool test: false + + Component.onCompleted: { + root.realProperty = 10; + } +} diff --git a/tests/auto/qml/qqmllanguage/data/ComponentComposite.qml b/tests/auto/qml/qqmllanguage/data/ComponentComposite.qml new file mode 100644 index 0000000000..889450b565 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/ComponentComposite.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Component { + QtObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/CompositeType.qml b/tests/auto/qml/qqmllanguage/data/CompositeType.qml new file mode 100644 index 0000000000..addc4265a9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeType.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +QtObject { +} diff --git a/tests/auto/qml/qqmllanguage/data/CompositeType2.qml b/tests/auto/qml/qqmllanguage/data/CompositeType2.qml new file mode 100644 index 0000000000..86210e9072 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeType2.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyQmlObject { +} + diff --git a/tests/auto/qml/qqmllanguage/data/CompositeType3.qml b/tests/auto/qml/qqmllanguage/data/CompositeType3.qml new file mode 100644 index 0000000000..f48a77598c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeType3.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int a +} diff --git a/tests/auto/qml/qqmllanguage/data/CompositeType4.qml b/tests/auto/qml/qqmllanguage/data/CompositeType4.qml new file mode 100644 index 0000000000..a6a8168d8f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeType4.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyQmlObject { + property int a +} + diff --git a/tests/auto/qml/qqmllanguage/data/DontDoubleCallClassBeginItem.qml b/tests/auto/qml/qqmllanguage/data/DontDoubleCallClassBeginItem.qml new file mode 100644 index 0000000000..1f8eac8a3b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/DontDoubleCallClassBeginItem.qml @@ -0,0 +1,4 @@ +import Test 1.0 + +MyParserStatus { +} diff --git a/tests/auto/qml/qqmllanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/qml/qqmllanguage/data/DynamicPropertiesNestedType.qml new file mode 100644 index 0000000000..4667adda14 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/DynamicPropertiesNestedType.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property int super_a: 10 + property int super_c: 14 +} diff --git a/tests/auto/qml/qqmllanguage/data/HelperAlias.qml b/tests/auto/qml/qqmllanguage/data/HelperAlias.qml new file mode 100644 index 0000000000..c2ab70ffd6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/HelperAlias.qml @@ -0,0 +1,9 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + property variant child + child: QtObject { id: obj } + property alias objAlias: obj; +} + diff --git a/tests/auto/qml/qqmllanguage/data/I18n.qml b/tests/auto/qml/qqmllanguage/data/I18n.qml new file mode 100644 index 0000000000..558c836e52 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/I18n.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + property int áâãäå: 10 + stringProperty: "Test áâãäå: " + áâãäå +} diff --git a/tests/auto/qml/qqmllanguage/data/I18nType30.qml b/tests/auto/qml/qqmllanguage/data/I18nType30.qml new file mode 100644 index 0000000000..42dbc69044 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/I18nType30.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + stringProperty: "Test áâãäå: 30" +} diff --git a/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType.qml b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType.qml new file mode 100644 index 0000000000..42513e463f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +QtObject { + property InlineAssignmentsOverrideBindingsType2 nested: InlineAssignmentsOverrideBindingsType2 { + value: 19 * 33 + } +} diff --git a/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType2.qml b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType2.qml new file mode 100644 index 0000000000..4a45535a50 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/InlineAssignmentsOverrideBindingsType2.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int value +} diff --git a/tests/auto/qml/qqmllanguage/data/LocalLast.qml b/tests/auto/qml/qqmllanguage/data/LocalLast.qml new file mode 100644 index 0000000000..59df88216e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/LocalLast.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Text {} diff --git a/tests/auto/qml/qqmllanguage/data/MyComponent.qml b/tests/auto/qml/qqmllanguage/data/MyComponent.qml new file mode 100644 index 0000000000..1a23277ff8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/MyComponent.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyQmlObject { + property real x; + property real y; +} diff --git a/tests/auto/qml/qqmllanguage/data/MyCompositeValueSource.qml b/tests/auto/qml/qqmllanguage/data/MyCompositeValueSource.qml new file mode 100644 index 0000000000..e620e26490 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/MyCompositeValueSource.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyPropertyValueSource { + property int x +} + diff --git a/tests/auto/qml/qqmllanguage/data/MyContainerComponent.qml b/tests/auto/qml/qqmllanguage/data/MyContainerComponent.qml new file mode 100644 index 0000000000..61f54c5eb8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/MyContainerComponent.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyContainer { + property int x +} diff --git a/tests/auto/qml/qqmllanguage/data/NestedAlias.qml b/tests/auto/qml/qqmllanguage/data/NestedAlias.qml new file mode 100644 index 0000000000..7d49b0ac98 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/NestedAlias.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +QtObject { + property QtObject o1 + property QtObject o2 + + property alias a: object2.a + + o1: QtObject { id: object1 } + o2: QtObject { + id: object2 + property int a: 1923 + } +} diff --git a/tests/auto/qml/qqmllanguage/data/NestedComponentRoot.qml b/tests/auto/qml/qqmllanguage/data/NestedComponentRoot.qml new file mode 100644 index 0000000000..887d7fae50 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/NestedComponentRoot.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Component { + Item { + } +} diff --git a/tests/auto/qml/qqmllanguage/data/NestedErrorsType.qml b/tests/auto/qml/qqmllanguage/data/NestedErrorsType.qml new file mode 100644 index 0000000000..06a3212916 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/NestedErrorsType.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + x: "You can't assign a string to a real!" +} diff --git a/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml b/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml new file mode 100644 index 0000000000..947f14811f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 + +MyQmlObject { + property int a: Math.max(10, 9) + property int b: 11 + Component.onCompleted: console.log("Completed " + a + " " + b); +} diff --git a/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml b/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml new file mode 100644 index 0000000000..11fb9d9578 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 + +MyQmlObject { + property int a: Math.max(10, 9) + property int b: 11 + Component.onDestruction: console.log("Destruction " + a + " " + b); +} diff --git a/tests/auto/qml/qqmllanguage/data/ReadOnlyType.qml b/tests/auto/qml/qqmllanguage/data/ReadOnlyType.qml new file mode 100644 index 0000000000..456ac762fc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/ReadOnlyType.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + readonly property int readOnlyProperty: 19 +} diff --git a/tests/auto/qml/qqmllanguage/data/alias.1.qml b/tests/auto/qml/qqmllanguage/data/alias.1.qml new file mode 100644 index 0000000000..dbb3f06d32 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.1.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + id: root + property int value: 10 + property alias valueAlias: root.value +} diff --git a/tests/auto/qml/qqmllanguage/data/alias.10.qml b/tests/auto/qml/qqmllanguage/data/alias.10.qml new file mode 100644 index 0000000000..bf6352e82b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.10.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias valueAlias: root.rectProperty + + rectProperty: "10,11,9x8" +} diff --git a/tests/auto/qml/qqmllanguage/data/alias.11.qml b/tests/auto/qml/qqmllanguage/data/alias.11.qml new file mode 100644 index 0000000000..fbd50d9dc9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.11.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyTypeObject { + id: root + + property alias aliasProperty: root.rectProperty.x + rectProperty: "19,13,100x120" +} diff --git a/tests/auto/qml/qqmllanguage/data/alias.2.qml b/tests/auto/qml/qqmllanguage/data/alias.2.qml new file mode 100644 index 0000000000..5c922709fe --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.2.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyQmlObject { + id: root + property alias aliasObject: root.qmlobjectProperty + + qmlobjectProperty: MyQmlObject { value : 10 } +} diff --git a/tests/auto/qml/qqmllanguage/data/alias.3.qml b/tests/auto/qml/qqmllanguage/data/alias.3.qml new file mode 100644 index 0000000000..16a6d9d903 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.3.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 + +QtObject { + property variant other + other: Alias { id: myAliasObject } + + property alias value: myAliasObject.aliasValue + property alias value2: myAliasObject.value +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.4.qml b/tests/auto/qml/qqmllanguage/data/alias.4.qml new file mode 100644 index 0000000000..bd6a769367 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.4.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +Alias2 { + enumAlias: MyTypeObject.EnumVal2 +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.5.qml b/tests/auto/qml/qqmllanguage/data/alias.5.qml new file mode 100644 index 0000000000..cee2a88cf7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.5.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 +import Test 1.0 + +QtObject { + property alias otherAlias: otherObject + + property variant other + other: MyQmlObject { + id: otherObject + value: 10 + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.6.qml b/tests/auto/qml/qqmllanguage/data/alias.6.qml new file mode 100644 index 0000000000..54d3c320e0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.6.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +QtObject { + property QtObject o; + property alias a: object.a + o: NestedAlias { id: object } +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.7.qml b/tests/auto/qml/qqmllanguage/data/alias.7.qml new file mode 100644 index 0000000000..0dc54d6787 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.7.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +QtObject { + property QtObject object + property alias aliasedObject: target.object + + object: QtObject { + id: target + + property QtObject object + object: QtObject {} + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.8.qml b/tests/auto/qml/qqmllanguage/data/alias.8.qml new file mode 100644 index 0000000000..3cb280ef47 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.8.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +QtObject { + property variant other + other: Alias3 { id: myAliasObject } + + property int value: myAliasObject.obj.myValue +} + diff --git a/tests/auto/qml/qqmllanguage/data/alias.9.qml b/tests/auto/qml/qqmllanguage/data/alias.9.qml new file mode 100644 index 0000000000..01cf9142b2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/alias.9.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +QtObject { + property variant other + other: Alias4 { id: myAliasObject } + + property int value: myAliasObject.obj.myValue +} + diff --git a/tests/auto/qml/qqmllanguage/data/aliasPropertiesAndSignals.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertiesAndSignals.qml new file mode 100644 index 0000000000..60e66921d2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/aliasPropertiesAndSignals.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +QtObject { + id: root + + property bool test: false + property alias myalias: root.objectName + signal go + onGo: test = true + + Component.onCompleted: { + root.go(); + } +} diff --git a/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.2.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.2.qml new file mode 100644 index 0000000000..089130d14c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.2.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 + +AliasPropertyChangeSignalsType { + id: root + onAliasPropertyChanged: root.test = true + + function blah() {} + property int a +} + diff --git a/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.qml b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.qml new file mode 100644 index 0000000000..4e11b9174a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/aliasPropertyChangeSignals.qml @@ -0,0 +1,16 @@ +import QtQuick 2.0 + +QtObject { + id: root + + property alias aliasProperty: root.realProperty + onAliasPropertyChanged: root.test = true + + property int realProperty: 0 + + property bool test: false + + Component.onCompleted: { + root.realProperty = 10; + } +} diff --git a/tests/auto/qml/qqmllanguage/data/allowedRevisionOverloads.qml b/tests/auto/qml/qqmllanguage/data/allowedRevisionOverloads.qml new file mode 100644 index 0000000000..64acbd1576 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/allowedRevisionOverloads.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyRevisionedLegalOverload +{ +} + diff --git a/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml b/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml new file mode 100644 index 0000000000..28a340128d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml @@ -0,0 +1,28 @@ +import Test 1.0 +MyTypeObject { + flagProperty: "FlagVal1 | FlagVal3" + enumProperty: "EnumVal2" + stringProperty: "Hello World!" + uintProperty: 10 + intProperty: -19 + realProperty: 23.2 + doubleProperty: -19.7 + floatProperty: 8.5 + colorProperty: "red" + dateProperty: "1982-11-25" + 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!" + vectorProperty: "10,1,2.2" + vector4Property: "10,1,2.2,2.3" + urlProperty: "main.qml?with%3cencoded%3edata" + + objectProperty: MyTypeObject { intProperty: 8 } +} diff --git a/tests/auto/qml/qqmllanguage/data/assignCompositeToType.qml b/tests/auto/qml/qqmllanguage/data/assignCompositeToType.qml new file mode 100644 index 0000000000..717cd84536 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignCompositeToType.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +import Test 1.0 + +QtObject { + property QtObject myProperty + property QtObject myProperty2 + property QtObject myProperty3 + property QtObject myProperty4 + property MyQmlObject myProperty5 + property MyQmlObject myProperty6 + + myProperty: CompositeType {} + myProperty2: CompositeType2 {} + myProperty3: CompositeType3 {} + myProperty4: CompositeType4 {} + myProperty5: CompositeType2 {} + myProperty6: CompositeType4 {} +} diff --git a/tests/auto/qml/qqmllanguage/data/assignLiteralSignalProperty.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralSignalProperty.qml new file mode 100644 index 0000000000..399fcea04d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignLiteralSignalProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + onLiteralSignal: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/assignLiteralToVar.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralToVar.qml new file mode 100644 index 0000000000..89e66c6172 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignLiteralToVar.qml @@ -0,0 +1,32 @@ +// This tests assigning literals to "var" properties. +// These properties store JavaScript object references. + +import QtQuick 2.0 + +QtObject { + property var test1: 1 + property var test2: 1.7 + property var test3: "Hello world!" + property var test4: "#FF008800" + property var test5: "10,10,10x10" + property var test6: "10,10" + property var test7: "10x10" + property var test8: "100,100,100" + property var test9: String("#FF008800") + property var test10: true + property var test11: false + + property variant variantTest1Bound: test1 + 4 // 1 + 4 + 4 = 9 + + property var test12: Qt.rgba(0.2, 0.3, 0.4, 0.5) + property var test13: Qt.rect(10, 10, 10, 10) + property var test14: Qt.point(10, 10) + property var test15: Qt.size(10, 10) + property var test16: Qt.vector3d(100, 100, 100) + + property var test1Bound: test1 + 6 // 1 + 4 + 6 = 11 + + Component.onCompleted: { + test1 = test1 + 4; + } +} diff --git a/tests/auto/qml/qqmllanguage/data/assignLiteralToVariant.qml b/tests/auto/qml/qqmllanguage/data/assignLiteralToVariant.qml new file mode 100644 index 0000000000..f6f9a139dc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignLiteralToVariant.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +QtObject { + property variant test1: 1 + property variant test2: 1.7 + property variant test3: "Hello world!" + property variant test4: "#FF008800" + property variant test5: "10,10,10x10" + property variant test6: "10,10" + property variant test7: "10x10" + property variant test8: "100,100,100" + property variant test9: String("#FF008800") + property variant test10: true + property variant test11: false + property variant test12: "100,100,100,100" +} + diff --git a/tests/auto/qml/qqmllanguage/data/assignObjectToSignal.qml b/tests/auto/qml/qqmllanguage/data/assignObjectToSignal.qml new file mode 100644 index 0000000000..789cc66215 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignObjectToSignal.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + onBasicSignal: MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/assignObjectToVariant.qml b/tests/auto/qml/qqmllanguage/data/assignObjectToVariant.qml new file mode 100644 index 0000000000..1f731c539c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignObjectToVariant.qml @@ -0,0 +1,7 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + property variant a; + a: MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/assignQmlComponent.qml b/tests/auto/qml/qqmllanguage/data/assignQmlComponent.qml new file mode 100644 index 0000000000..20bdc559c1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignQmlComponent.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + MyComponent { x: 10; y: 11; } +} diff --git a/tests/auto/qml/qqmllanguage/data/assignSignal.qml b/tests/auto/qml/qqmllanguage/data/assignSignal.qml new file mode 100644 index 0000000000..2a48df8fcf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignSignal.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + onBasicSignal: basicSlot() + onBasicParameterizedSignal: basicSlotWithArgs(parameter) +} diff --git a/tests/auto/qml/qqmllanguage/data/assignToNamespace.errors.txt b/tests/auto/qml/qqmllanguage/data/assignToNamespace.errors.txt new file mode 100644 index 0000000000..78aa4713fb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignToNamespace.errors.txt @@ -0,0 +1 @@ +4:5:Invalid use of namespace diff --git a/tests/auto/qml/qqmllanguage/data/assignToNamespace.qml b/tests/auto/qml/qqmllanguage/data/assignToNamespace.qml new file mode 100644 index 0000000000..54fef61ef0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignToNamespace.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 as Qt47 + +Qt47.QtObject { + Qt47: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/assignTypeExtremes.qml b/tests/auto/qml/qqmllanguage/data/assignTypeExtremes.qml new file mode 100644 index 0000000000..60ede525e4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignTypeExtremes.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + uintProperty: 4000000000 + intProperty: -2000000000 +} diff --git a/tests/auto/qml/qqmllanguage/data/assignValueToSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.errors.txt new file mode 100644 index 0000000000..eb1430a715 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.errors.txt @@ -0,0 +1 @@ +4:5:Cannot assign a value to a signal (expecting a script to be run) diff --git a/tests/auto/qml/qqmllanguage/data/assignValueToSignal.qml b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.qml new file mode 100644 index 0000000000..6fa1259f39 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignValueToSignal.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyQmlObject { + onBasicSignal: "hello world" +} + diff --git a/tests/auto/qml/qqmllanguage/data/attachedProperties.qml b/tests/auto/qml/qqmllanguage/data/attachedProperties.qml new file mode 100644 index 0000000000..3637ded26f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/attachedProperties.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + MyQmlObject.value: 10 + Namespace.MyQmlObject.value2: 13 +} diff --git a/tests/auto/qml/qqmllanguage/data/autoComponentCreation.qml b/tests/auto/qml/qqmllanguage/data/autoComponentCreation.qml new file mode 100644 index 0000000000..5d00144eaf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/autoComponentCreation.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + componentProperty : MyTypeObject { realProperty: 9 } +} diff --git a/tests/auto/qml/qqmllanguage/data/autoNotifyConnection.qml b/tests/auto/qml/qqmllanguage/data/autoNotifyConnection.qml new file mode 100644 index 0000000000..640fb54f99 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/autoNotifyConnection.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyQmlObject { + property bool receivedNotify : false + onPropertyWithNotifyChanged: { receivedNotify = true; } +} + diff --git a/tests/auto/qml/qqmllanguage/data/component.1.errors.txt b/tests/auto/qml/qqmllanguage/data/component.1.errors.txt new file mode 100644 index 0000000000..091aad61fa --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.1.errors.txt @@ -0,0 +1 @@ +3:1:Cannot create empty component specification diff --git a/tests/auto/qml/qqmllanguage/data/component.1.qml b/tests/auto/qml/qqmllanguage/data/component.1.qml new file mode 100644 index 0000000000..a22772bd89 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.1.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +Component { +} diff --git a/tests/auto/qml/qqmllanguage/data/component.2.errors.txt b/tests/auto/qml/qqmllanguage/data/component.2.errors.txt new file mode 100644 index 0000000000..76e7656a62 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.2.errors.txt @@ -0,0 +1 @@ +6:9:id is not unique diff --git a/tests/auto/qml/qqmllanguage/data/component.2.qml b/tests/auto/qml/qqmllanguage/data/component.2.qml new file mode 100644 index 0000000000..fbe315f771 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.2.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +Item { + id: myId + Component { + id: myId + QtObject {} + } +} diff --git a/tests/auto/qml/qqmllanguage/data/component.3.errors.txt b/tests/auto/qml/qqmllanguage/data/component.3.errors.txt new file mode 100644 index 0000000000..450fc163bd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.3.errors.txt @@ -0,0 +1 @@ +6:9:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/component.3.qml b/tests/auto/qml/qqmllanguage/data/component.3.qml new file mode 100644 index 0000000000..bac23ef903 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.3.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +Item { + Component { + id: myId + id: myId2 + QtObject {} + } +} diff --git a/tests/auto/qml/qqmllanguage/data/component.4.errors.txt b/tests/auto/qml/qqmllanguage/data/component.4.errors.txt new file mode 100644 index 0000000000..2ab18685c8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.4.errors.txt @@ -0,0 +1 @@ +3:1:Invalid component body specification diff --git a/tests/auto/qml/qqmllanguage/data/component.4.qml b/tests/auto/qml/qqmllanguage/data/component.4.qml new file mode 100644 index 0000000000..d07695477d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.4.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Component { + QtObject {} + QtObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/component.5.errors.txt b/tests/auto/qml/qqmllanguage/data/component.5.errors.txt new file mode 100644 index 0000000000..e3c2df755f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.5.errors.txt @@ -0,0 +1 @@ +4:5:Component elements may not contain properties other than id diff --git a/tests/auto/qml/qqmllanguage/data/component.5.qml b/tests/auto/qml/qqmllanguage/data/component.5.qml new file mode 100644 index 0000000000..9867377bb9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.5.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Component { + x: 10 + QtObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/component.6.errors.txt b/tests/auto/qml/qqmllanguage/data/component.6.errors.txt new file mode 100644 index 0000000000..2b1c6ca606 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.6.errors.txt @@ -0,0 +1 @@ +4:5:Invalid component id specification diff --git a/tests/auto/qml/qqmllanguage/data/component.6.qml b/tests/auto/qml/qqmllanguage/data/component.6.qml new file mode 100644 index 0000000000..010949a35f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.6.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Component { + id: QtObject {} + QtObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/component.7.errors.txt b/tests/auto/qml/qqmllanguage/data/component.7.errors.txt new file mode 100644 index 0000000000..b144814a70 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.7.errors.txt @@ -0,0 +1 @@ +3:1:Component objects cannot declare new properties. diff --git a/tests/auto/qml/qqmllanguage/data/component.7.qml b/tests/auto/qml/qqmllanguage/data/component.7.qml new file mode 100644 index 0000000000..b1a31195eb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.7.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Component { + property int a + QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/component.8.errors.txt b/tests/auto/qml/qqmllanguage/data/component.8.errors.txt new file mode 100644 index 0000000000..6f2d0d201d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.8.errors.txt @@ -0,0 +1 @@ +3:1:Component objects cannot declare new signals. diff --git a/tests/auto/qml/qqmllanguage/data/component.8.qml b/tests/auto/qml/qqmllanguage/data/component.8.qml new file mode 100644 index 0000000000..fb7a079d39 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.8.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Component { + signal a + QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/component.9.errors.txt b/tests/auto/qml/qqmllanguage/data/component.9.errors.txt new file mode 100644 index 0000000000..92f1456895 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.9.errors.txt @@ -0,0 +1 @@ +3:1:Component objects cannot declare new functions. diff --git a/tests/auto/qml/qqmllanguage/data/component.9.qml b/tests/auto/qml/qqmllanguage/data/component.9.qml new file mode 100644 index 0000000000..17824b4ede --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/component.9.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Component { + function a() {} + QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/componentCompositeType.qml b/tests/auto/qml/qqmllanguage/data/componentCompositeType.qml new file mode 100644 index 0000000000..232b320fb0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/componentCompositeType.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +QtObject { + property variant test + + test: ComponentComposite {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/cppnamespace.2.qml b/tests/auto/qml/qqmllanguage/data/cppnamespace.2.qml new file mode 100644 index 0000000000..e3b32ca5d8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/cppnamespace.2.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MySecondNamespacedType { + list: [ MyNamespacedType {} ] +} diff --git a/tests/auto/qml/qqmllanguage/data/cppnamespace.qml b/tests/auto/qml/qqmllanguage/data/cppnamespace.qml new file mode 100644 index 0000000000..e1daf3b78f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/cppnamespace.qml @@ -0,0 +1,4 @@ +import Test 1.0 + +MyNamespacedType { +} diff --git a/tests/auto/qml/qqmllanguage/data/crash2.qml b/tests/auto/qml/qqmllanguage/data/crash2.qml new file mode 100644 index 0000000000..2b8d285348 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/crash2.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + objectName: "Hello" + "World" +} diff --git a/tests/auto/qml/qqmllanguage/data/customOnProperty.qml b/tests/auto/qml/qqmllanguage/data/customOnProperty.qml new file mode 100644 index 0000000000..57241ffc28 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/customOnProperty.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +QtObject { + property int on + + Component.onCompleted: on = 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.errors.txt b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.errors.txt new file mode 100644 index 0000000000..43a8bb28b3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.errors.txt @@ -0,0 +1 @@ +4:19:ListElement: cannot use reserved "id" property diff --git a/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.qml b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.qml new file mode 100644 index 0000000000..c42173ddfb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/customParserIdNotAllowed.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 +ListModel { + ListElement { a: 10 } + ListElement { id: foo; a: 12 } +} diff --git a/tests/auto/qml/qqmllanguage/data/customParserTypes.qml b/tests/auto/qml/qqmllanguage/data/customParserTypes.qml new file mode 100644 index 0000000000..76a8a4773f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/customParserTypes.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 +ListModel { + ListElement { a: 10 } + ListElement { a: 12 } +} diff --git a/tests/auto/qml/qqmllanguage/data/customVariantTypes.qml b/tests/auto/qml/qqmllanguage/data/customVariantTypes.qml new file mode 100644 index 0000000000..0263ed20f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/customVariantTypes.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + customType: "10" +} diff --git a/tests/auto/qml/qqmllanguage/data/declaredPropertyValues.qml b/tests/auto/qml/qqmllanguage/data/declaredPropertyValues.qml new file mode 100644 index 0000000000..03f5c1ff7e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/declaredPropertyValues.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +QtObject { + property int a: 10 + property int b: 10 + a + property QtObject c: QtObject {} + property list<QtObject> d: [ QtObject {}, QtObject {} ] +} diff --git a/tests/auto/qml/qqmllanguage/data/defaultGrouped.errors.txt b/tests/auto/qml/qqmllanguage/data/defaultGrouped.errors.txt new file mode 100644 index 0000000000..32055f6608 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/defaultGrouped.errors.txt @@ -0,0 +1 @@ +7:9:Cannot assign a value directly to a grouped property diff --git a/tests/auto/qml/qqmllanguage/data/defaultGrouped.qml b/tests/auto/qml/qqmllanguage/data/defaultGrouped.qml new file mode 100644 index 0000000000..66a78eb67f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/defaultGrouped.qml @@ -0,0 +1,10 @@ +import Test 1.0 +import QtQuick 2.0 + +MyTypeObject { + grouped { + script: console.log(1921) + QtObject {} + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml b/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml new file mode 100644 index 0000000000..31d17fd55f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml @@ -0,0 +1,29 @@ +import Test 1.0 +import QtQuick 2.0 + +MyContainer { + QtObject { + property int index: 0 + } + + QtObject { + property int index: 1 + } + + children: [ + QtObject { + property int index: 2 + }, + QtObject { + property int index: 3 + } + ] + + QtObject { + property int index: 4 + } + + QtObject { + property int index: 5 + } +} diff --git a/tests/auto/qml/qqmllanguage/data/destroyedSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/destroyedSignal.errors.txt new file mode 100644 index 0000000000..3348494a8f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/destroyedSignal.errors.txt @@ -0,0 +1 @@ +4:5:Cannot assign to non-existent property "onDestroyed" diff --git a/tests/auto/qml/qqmllanguage/data/destroyedSignal.qml b/tests/auto/qml/qqmllanguage/data/destroyedSignal.qml new file mode 100644 index 0000000000..b5b29148a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/destroyedSignal.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + onDestroyed: print("Hello World!") +} diff --git a/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.errors.txt b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.errors.txt new file mode 100644 index 0000000000..e9b449d8d9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.errors.txt @@ -0,0 +1 @@ +3:1:Type Test/MyRevisionedIllegalOverload 1.0 contains an illegal property "propA". This is an error in the type's implementation. diff --git a/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.qml b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.qml new file mode 100644 index 0000000000..612bcfe0ea --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/disallowedRevisionOverloads.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyRevisionedIllegalOverload +{ +} + + diff --git a/tests/auto/qml/qqmllanguage/data/dontDoubleCallClassBegin.qml b/tests/auto/qml/qqmllanguage/data/dontDoubleCallClassBegin.qml new file mode 100644 index 0000000000..905ee48e0b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dontDoubleCallClassBegin.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + property QtObject object: DontDoubleCallClassBeginItem {} +} diff --git a/tests/auto/qml/qqmllanguage/data/doubleSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/doubleSignal.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/doubleSignal.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/doubleSignal.qml b/tests/auto/qml/qqmllanguage/data/doubleSignal.qml new file mode 100644 index 0000000000..fb07b9f659 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/doubleSignal.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyQmlObject { + onBasicSignal: console.log(1921) + onBasicSignal: console.log(1921) +} + diff --git a/tests/auto/qml/qqmllanguage/data/duplicateIDs.errors.txt b/tests/auto/qml/qqmllanguage/data/duplicateIDs.errors.txt new file mode 100644 index 0000000000..66241cf1f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/duplicateIDs.errors.txt @@ -0,0 +1 @@ +4:19:id is not unique diff --git a/tests/auto/qml/qqmllanguage/data/duplicateIDs.qml b/tests/auto/qml/qqmllanguage/data/duplicateIDs.qml new file mode 100644 index 0000000000..a993abdd37 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/duplicateIDs.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainer { + MyQmlObject { id: myID } + MyQmlObject { id: myID } +} + diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.errors.txt new file mode 100644 index 0000000000..1f9f9169e9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.errors.txt @@ -0,0 +1 @@ +5:5:Duplicate default property diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.qml new file mode 100644 index 0000000000..3dbd5b0b2e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.1.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + default property QtObject a + default property QtObject b +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.errors.txt new file mode 100644 index 0000000000..713d5f6272 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.errors.txt @@ -0,0 +1 @@ +5:19:Duplicate property name diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.qml new file mode 100644 index 0000000000..5d4efeebb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.2.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property int a + property bool a +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.errors.txt new file mode 100644 index 0000000000..8226c16a1e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.errors.txt @@ -0,0 +1 @@ +5:12:Duplicate signal name diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.qml new file mode 100644 index 0000000000..f084947eaf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.3.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + signal a + signal a +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.errors.txt new file mode 100644 index 0000000000..028e25c37f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.errors.txt @@ -0,0 +1 @@ +5:14:Duplicate method name diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.qml new file mode 100644 index 0000000000..3691529aa9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.4.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + function a() {} + function a() {} +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.errors.txt b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.errors.txt new file mode 100644 index 0000000000..015d55b03b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.errors.txt @@ -0,0 +1 @@ +3:1:UnknownType is not a type diff --git a/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.qml b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.qml new file mode 100644 index 0000000000..64ba907415 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicMeta.5.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property UnknownType a +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicObject.1.qml b/tests/auto/qml/qqmllanguage/data/dynamicObject.1.qml new file mode 100644 index 0000000000..2214bacda0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicObject.1.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 +MyCustomParserType { + propa: a + 10 + propb: Math.min(a, 10) + propc: MyPropertyValueSource {} + onPropA: a +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml new file mode 100644 index 0000000000..6f822ba157 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 +import QtQuick 2.0 as Qt47 + +Qt.QtObject { + property Qt47.QtObject objectProperty + property list<Qt47.QtObject> objectPropertyList + + objectProperty: QtObject {} + objectPropertyList: QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml new file mode 100644 index 0000000000..5d072b160a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml @@ -0,0 +1,13 @@ +import Test 1.0 +import QtQuick 2.0 +import QtQuick 2.0 as Qt47 + +QtObject { + property QtObject objectProperty + property QtObject objectProperty2 + objectProperty2: QtObject {} + + property MyComponent myComponentProperty + property MyComponent myComponentProperty2 + myComponentProperty2: MyComponent {} +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicProperties.qml b/tests/auto/qml/qqmllanguage/data/dynamicProperties.qml new file mode 100644 index 0000000000..cd403b3d46 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicProperties.qml @@ -0,0 +1,13 @@ +import Test 1.0 +import QtQuick 2.0 +QtObject { + 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 url urlProperty: "main.qml" + property date dateProperty: "1945-09-02" + property variant varProperty: "Hello World!" +} diff --git a/tests/auto/qml/qqmllanguage/data/dynamicPropertiesNested.qml b/tests/auto/qml/qqmllanguage/data/dynamicPropertiesNested.qml new file mode 100644 index 0000000000..b86e89b5e7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicPropertiesNested.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +DynamicPropertiesNestedType { + property int a: 13 + property int b: 12 + + super_a: 11 +} + diff --git a/tests/auto/qml/qqmllanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/qml/qqmllanguage/data/dynamicSignalsAndSlots.qml new file mode 100644 index 0000000000..d80d94be09 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/dynamicSignalsAndSlots.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 +QtObject { + signal signal1 + function slot1() {} + signal signal2 + function slot2() {} + + property int test: 0 + function slot3(a) { console.log(1921); test = a; } +} diff --git a/tests/auto/qml/qqmllanguage/data/empty.errors.txt b/tests/auto/qml/qqmllanguage/data/empty.errors.txt new file mode 100644 index 0000000000..620db2bbba --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/empty.errors.txt @@ -0,0 +1,2 @@ +1:1:Expected token `numeric literal' +1:1:Expected a qualified name id diff --git a/tests/auto/qml/qqmllanguage/data/empty.qml b/tests/auto/qml/qqmllanguage/data/empty.qml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/empty.qml diff --git a/tests/auto/qml/qqmllanguage/data/emptySignal.errors.txt b/tests/auto/qml/qqmllanguage/data/emptySignal.errors.txt new file mode 100644 index 0000000000..8b20434973 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/emptySignal.errors.txt @@ -0,0 +1 @@ +4:5:Incorrectly specified signal assignment diff --git a/tests/auto/qml/qqmllanguage/data/emptySignal.qml b/tests/auto/qml/qqmllanguage/data/emptySignal.qml new file mode 100644 index 0000000000..c84fea3fe6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/emptySignal.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyQmlObject { + onBasicSignal { + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/enumTypes.errors.txt b/tests/auto/qml/qqmllanguage/data/enumTypes.errors.txt new file mode 100644 index 0000000000..d4e0cc0bc4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/enumTypes.errors.txt @@ -0,0 +1 @@ +3:1:Element is not creatable. diff --git a/tests/auto/qml/qqmllanguage/data/enumTypes.qml b/tests/auto/qml/qqmllanguage/data/enumTypes.qml new file mode 100644 index 0000000000..ff083250f0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/enumTypes.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +Font { +} diff --git a/tests/auto/qml/qqmllanguage/data/failingComponent.errors.txt b/tests/auto/qml/qqmllanguage/data/failingComponent.errors.txt new file mode 100644 index 0000000000..364ca6747f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/failingComponent.errors.txt @@ -0,0 +1 @@ +3:5:FailingComponent is not a type diff --git a/tests/auto/qml/qqmllanguage/data/failingComponentTest.qml b/tests/auto/qml/qqmllanguage/data/failingComponentTest.qml new file mode 100644 index 0000000000..74a6acfc49 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/failingComponentTest.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + FailingComponent {} +} diff --git a/tests/auto/qml/qqmllanguage/data/fakeDotProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.errors.txt new file mode 100644 index 0000000000..30748234bc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.errors.txt @@ -0,0 +1 @@ +3:5:Invalid grouped property access diff --git a/tests/auto/qml/qqmllanguage/data/fakeDotProperty.qml b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.qml new file mode 100644 index 0000000000..d971eee4d0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/fakeDotProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value.something: "hello" +} diff --git a/tests/auto/qml/qqmllanguage/data/finalOverride.errors.txt b/tests/auto/qml/qqmllanguage/data/finalOverride.errors.txt new file mode 100644 index 0000000000..49e06cbdf5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/finalOverride.errors.txt @@ -0,0 +1 @@ +3:5:Cannot override FINAL property diff --git a/tests/auto/qml/qqmllanguage/data/finalOverride.qml b/tests/auto/qml/qqmllanguage/data/finalOverride.qml new file mode 100644 index 0000000000..a84393af94 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/finalOverride.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + property int value: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyNames.qml b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyNames.qml new file mode 100644 index 0000000000..558c836e52 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyNames.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + property int áâãäå: 10 + stringProperty: "Test áâãäå: " + áâãäå +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyUse.qml b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyUse.qml new file mode 100644 index 0000000000..74918e2764 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nDeclaredPropertyUse.qml @@ -0,0 +1,3 @@ +I18n { + áâãäå: 15 +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nNameSpace.qml b/tests/auto/qml/qqmllanguage/data/i18nNameSpace.qml new file mode 100644 index 0000000000..c0b2f94857 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nNameSpace.qml @@ -0,0 +1,5 @@ +import Test 1.0 as Áâãäå + +Áâãäå.MyTypeObject { + stringProperty: "Test áâãäå: 40" +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nScript.qml b/tests/auto/qml/qqmllanguage/data/i18nScript.qml new file mode 100644 index 0000000000..e77cb52074 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nScript.qml @@ -0,0 +1,9 @@ +import Test 1.0 + +MyTypeObject { + function val() { + var áâãäå = 20 + return "Test áâãäå: " + áâãäå + } + stringProperty: val() +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nStrings.qml b/tests/auto/qml/qqmllanguage/data/i18nStrings.qml new file mode 100644 index 0000000000..764c92639a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nStrings.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + stringProperty: "Test áâãäå (5 accented 'a' letters)" +} diff --git a/tests/auto/qml/qqmllanguage/data/i18nType.qml b/tests/auto/qml/qqmllanguage/data/i18nType.qml new file mode 100644 index 0000000000..d7954ef718 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/i18nType.qml @@ -0,0 +1 @@ +I18nTypeÁâãäå { } diff --git a/tests/auto/qml/qqmllanguage/data/idProperty.qml b/tests/auto/qml/qqmllanguage/data/idProperty.qml new file mode 100644 index 0000000000..bf048ea60a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/idProperty.qml @@ -0,0 +1,8 @@ +import Test 1.0 +MyContainer { + property variant object : myObjectId + + MyTypeObject { + id: "myObjectId" + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importFile.errors.txt b/tests/auto/qml/qqmllanguage/data/importFile.errors.txt new file mode 100644 index 0000000000..3fdac0921e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importFile.errors.txt @@ -0,0 +1 @@ +1:1:"MyComponent.qml": no such directory diff --git a/tests/auto/qml/qqmllanguage/data/importFile.qml b/tests/auto/qml/qqmllanguage/data/importFile.qml new file mode 100644 index 0000000000..a0d8410ca3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importFile.qml @@ -0,0 +1,3 @@ +import "MyComponent.qml" 1.0 + +MyComponent { text: "Hello" } diff --git a/tests/auto/qml/qqmllanguage/data/importIncorrectCase.qml b/tests/auto/qml/qqmllanguage/data/importIncorrectCase.qml new file mode 100644 index 0000000000..804e76b932 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importIncorrectCase.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 +import com.Nokia.installedtest 1.0 + +QtObject { +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.1.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.1.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.1.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.1.qml b/tests/auto/qml/qqmllanguage/data/importJs.1.qml new file mode 100644 index 0000000000..eaba98ecd2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.1.qml @@ -0,0 +1,12 @@ +import com.nokia.PureJsModule 1.0 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((FirstAPI.greeting() == "Hello") && + (FirstAPI.major == 1) && + (FirstAPI.minor == 0)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.10.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.10.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.10.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.10.qml b/tests/auto/qml/qqmllanguage/data/importJs.10.qml new file mode 100644 index 0000000000..578ca47ea5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.10.qml @@ -0,0 +1,16 @@ +import com.nokia.PureJsModule 1.0 as PJM +import com.nokia.PureJsModule 1.0 as AnotherName +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((PJM.FirstAPI.greeting() == "Hello") && + (PJM.FirstAPI.major == 1) && + (PJM.FirstAPI.minor == 0) && + (AnotherName.FirstAPI.greeting() == "Hello") && + (AnotherName.FirstAPI.major == 1) && + (AnotherName.FirstAPI.minor == 0)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.2.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.2.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.2.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.2.qml b/tests/auto/qml/qqmllanguage/data/importJs.2.qml new file mode 100644 index 0000000000..dd3d65c5dd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.2.qml @@ -0,0 +1,12 @@ +import com.nokia.VersionedOnlyJsModule 9.0 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((SomeAPI.greeting() == "Hey hey hey") && + (SomeAPI.major == 9) && + (SomeAPI.minor == 0)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.3.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.3.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.3.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.3.qml b/tests/auto/qml/qqmllanguage/data/importJs.3.qml new file mode 100644 index 0000000000..f59d445a56 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.3.qml @@ -0,0 +1,16 @@ +import com.nokia.PureJsModule 1.0 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((FirstAPI.greeting() == "Hello") && + (FirstAPI.major == 1) && + (FirstAPI.minor == 0) && + (SecondAPI.greeting() == "Howdy") && + (SecondAPI.major == 1) && + (SecondAPI.minor == 5)) + + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.4.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.4.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.4.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.4.qml b/tests/auto/qml/qqmllanguage/data/importJs.4.qml new file mode 100644 index 0000000000..e7b74bac0a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.4.qml @@ -0,0 +1,15 @@ +import com.nokia.PureJsModule 1.6 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((FirstAPI.greeting() == "Good news, everybody!") && + (FirstAPI.major == 1) && + (FirstAPI.minor == 6) && + (SecondAPI.greeting() == "Howdy") && + (SecondAPI.major == 1) && + (SecondAPI.minor == 5)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.5.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.5.errors.txt new file mode 100644 index 0000000000..10dbc80297 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.5.errors.txt @@ -0,0 +1 @@ +1:1:module "com.nokia.VersionedOnlyJsModule" is not installed diff --git a/tests/auto/qml/qqmllanguage/data/importJs.5.qml b/tests/auto/qml/qqmllanguage/data/importJs.5.qml new file mode 100644 index 0000000000..a9ec20c72b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.5.qml @@ -0,0 +1,6 @@ +import com.nokia.VersionedOnlyJsModule 1.0 +import QtQuick 2.0 + +Item { + property bool test: false +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.6.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.6.errors.txt new file mode 100644 index 0000000000..41c99702a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.6.errors.txt @@ -0,0 +1 @@ +2:1:"com.nokia.VersionedOnlyJsModule" is ambiguous. diff --git a/tests/auto/qml/qqmllanguage/data/importJs.6.qml b/tests/auto/qml/qqmllanguage/data/importJs.6.qml new file mode 100644 index 0000000000..6c4eb89551 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.6.qml @@ -0,0 +1,13 @@ +import com.nokia.VersionedOnlyJsModule 9.0 +import com.nokia.VersionedOnlyJsModule 9.0 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((SomeAPI.greeting() == "Hey hey hey") && + (SomeAPI.major == 9) && + (SomeAPI.minor == 0)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt new file mode 100644 index 0000000000..56bc4c548f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt @@ -0,0 +1 @@ +2:1:"com.nokia.PureJsModule" is ambiguous. diff --git a/tests/auto/qml/qqmllanguage/data/importJs.7.qml b/tests/auto/qml/qqmllanguage/data/importJs.7.qml new file mode 100644 index 0000000000..5523a158bd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.7.qml @@ -0,0 +1,13 @@ +import com.nokia.PureJsModule 1.0 +import com.nokia.PureJsModule 1.6 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((FirstAPI.greeting() == "Hello") && + (FirstAPI.major == 1) && + (FirstAPI.minor == 0)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.8.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.8.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.8.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.8.qml b/tests/auto/qml/qqmllanguage/data/importJs.8.qml new file mode 100644 index 0000000000..4ddedc31a8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.8.qml @@ -0,0 +1,15 @@ +import com.nokia.PureJsModule 1.5 as PJM +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((PJM.FirstAPI.greeting() == "Hello") && + (PJM.FirstAPI.major == 1) && + (PJM.FirstAPI.minor == 0) && + (PJM.SecondAPI.greeting() == "Howdy") && + (PJM.SecondAPI.major == 1) && + (PJM.SecondAPI.minor == 5)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importJs.9.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.9.errors.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.9.errors.txt diff --git a/tests/auto/qml/qqmllanguage/data/importJs.9.qml b/tests/auto/qml/qqmllanguage/data/importJs.9.qml new file mode 100644 index 0000000000..351164ba41 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importJs.9.qml @@ -0,0 +1,19 @@ +import com.nokia.PureJsModule 1.5 as PJM_1_5 +import com.nokia.PureJsModule 1.6 as PJM_1_6 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((PJM_1_5.FirstAPI.greeting() == "Hello") && + (PJM_1_5.FirstAPI.major == 1) && + (PJM_1_5.FirstAPI.minor == 0) && + (PJM_1_5.SecondAPI.greeting() == "Howdy") && + (PJM_1_5.SecondAPI.major == 1) && + (PJM_1_5.SecondAPI.minor == 5) && + (PJM_1_6.FirstAPI.greeting() == "Good news, everybody!") && + (PJM_1_6.FirstAPI.major == 1) && + (PJM_1_6.FirstAPI.minor == 6)) + } +} diff --git a/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.errors.txt b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.errors.txt new file mode 100644 index 0000000000..231998daf7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.errors.txt @@ -0,0 +1 @@ +4:1:Namespace Rectangle cannot be used as a type diff --git a/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.qml b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.qml new file mode 100644 index 0000000000..45ad40501b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNamespaceConflict.qml @@ -0,0 +1,4 @@ +import Test 1.0 as Rectangle +import QtQuick 2.0 + +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/importNewerVersion.errors.txt b/tests/auto/qml/qqmllanguage/data/importNewerVersion.errors.txt new file mode 100644 index 0000000000..413f096384 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNewerVersion.errors.txt @@ -0,0 +1 @@ +1:1:module "Test" version 2.0 is not installed diff --git a/tests/auto/qml/qqmllanguage/data/importNewerVersion.qml b/tests/auto/qml/qqmllanguage/data/importNewerVersion.qml new file mode 100644 index 0000000000..c4a0d386a4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNewerVersion.qml @@ -0,0 +1,3 @@ +import Test 2.0 + +MyTypeObject { } diff --git a/tests/auto/qml/qqmllanguage/data/importNonExist.errors.txt b/tests/auto/qml/qqmllanguage/data/importNonExist.errors.txt new file mode 100644 index 0000000000..1baf05cee0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNonExist.errors.txt @@ -0,0 +1 @@ +2:1:"will-not-be-found": no such directory diff --git a/tests/auto/qml/qqmllanguage/data/importNonExist.qml b/tests/auto/qml/qqmllanguage/data/importNonExist.qml new file mode 100644 index 0000000000..5cbee0264b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNonExist.qml @@ -0,0 +1,5 @@ +// imports... +import "will-not-be-found" +import QtQuick 2.0 + +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/importNonExistOlder.errors.txt b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.errors.txt new file mode 100644 index 0000000000..dfa7a369ff --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.errors.txt @@ -0,0 +1 @@ +1:1:module "Test" version 0.1 is not installed diff --git a/tests/auto/qml/qqmllanguage/data/importNonExistOlder.qml b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.qml new file mode 100644 index 0000000000..18514b1efa --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importNonExistOlder.qml @@ -0,0 +1,3 @@ +import Test 0.1 + +MyTypeObject { } diff --git a/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.errors.txt b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.errors.txt new file mode 100644 index 0000000000..c7d880e79e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.errors.txt @@ -0,0 +1 @@ +1:16:Library import requires a version diff --git a/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.qml b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.qml new file mode 100644 index 0000000000..23ed566e15 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importVersionMissingBuiltIn.qml @@ -0,0 +1,7 @@ +import Test as S + +S.MyQmlObject { + property real x; + property real y; +} + diff --git a/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.errors.txt b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.errors.txt new file mode 100644 index 0000000000..89e58ee764 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.errors.txt @@ -0,0 +1 @@ +1:35:Library import requires a version diff --git a/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.qml b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.qml new file mode 100644 index 0000000000..97ec22280f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importVersionMissingInstalled.qml @@ -0,0 +1,3 @@ +import com.nokia.installedtest as T + +T.InstalledTest {} diff --git a/tests/auto/qml/qqmllanguage/data/importscript.1.errors.txt b/tests/auto/qml/qqmllanguage/data/importscript.1.errors.txt new file mode 100644 index 0000000000..ebc936d153 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importscript.1.errors.txt @@ -0,0 +1 @@ +1:8:Script import requires a qualifier diff --git a/tests/auto/qml/qqmllanguage/data/importscript.1.qml b/tests/auto/qml/qqmllanguage/data/importscript.1.qml new file mode 100644 index 0000000000..2b2ab6ba0d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/importscript.1.qml @@ -0,0 +1,3 @@ +import "test.js" + +Item { } diff --git a/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.insensitive.txt b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.insensitive.txt new file mode 100644 index 0000000000..3813680562 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.insensitive.txt @@ -0,0 +1,2 @@ +3:1:Type IncorrectCaseType unavailable +-1:-1:File name case mismatch diff --git a/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.sensitive.txt b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.sensitive.txt new file mode 100644 index 0000000000..abed1a73f5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/incorrectCase.errors.sensitive.txt @@ -0,0 +1 @@ +3:1:IncorrectCaseType is not a type diff --git a/tests/auto/qml/qqmllanguage/data/incorrectCase.qml b/tests/auto/qml/qqmllanguage/data/incorrectCase.qml new file mode 100644 index 0000000000..15b6dc3a6e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/incorrectCase.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +IncorrectCaseType { +} diff --git a/tests/auto/qml/qqmllanguage/data/incorrectCaseType.qml b/tests/auto/qml/qqmllanguage/data/incorrectCaseType.qml new file mode 100644 index 0000000000..addc4265a9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/incorrectCaseType.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +QtObject { +} diff --git a/tests/auto/qml/qqmllanguage/data/inlineAssignmentsOverrideBindings.qml b/tests/auto/qml/qqmllanguage/data/inlineAssignmentsOverrideBindings.qml new file mode 100644 index 0000000000..4390d22d45 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/inlineAssignmentsOverrideBindings.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +InlineAssignmentsOverrideBindingsType { + property int test: nested.value + nested.value: 11 +} diff --git a/tests/auto/qml/qqmllanguage/data/inlineQmlComponents.qml b/tests/auto/qml/qqmllanguage/data/inlineQmlComponents.qml new file mode 100644 index 0000000000..a6f277adb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/inlineQmlComponents.qml @@ -0,0 +1,10 @@ +import Test 1.0 +import QtQuick 2.0 +MyContainer { + Component { + id: myComponent + MyQmlObject { + value: 11 + } + } +} diff --git a/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.errors.txt b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.errors.txt new file mode 100644 index 0000000000..651009cf05 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.errors.txt @@ -0,0 +1 @@ +9:5:Expected a qualified name id diff --git a/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml new file mode 100644 index 0000000000..4e561b48b2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/insertedSemicolon.1.qml @@ -0,0 +1,10 @@ +import Test 1.0 + +MyQmlObject { + function foo() + { + return + } + + 1223 +} diff --git a/tests/auto/qml/qqmllanguage/data/interfaceProperty.qml b/tests/auto/qml/qqmllanguage/data/interfaceProperty.qml new file mode 100644 index 0000000000..f85e3e4e5b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/interfaceProperty.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import QtQuick 2.0 +MyQmlObject { + interfaceProperty: MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/interfaceQList.qml b/tests/auto/qml/qqmllanguage/data/interfaceQList.qml new file mode 100644 index 0000000000..c87dfae785 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/interfaceQList.qml @@ -0,0 +1,7 @@ +import Test 1.0 +MyContainer { + qlistInterfaces: [ + MyQmlObject {}, + MyQmlObject {} + ] +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt new file mode 100644 index 0000000000..9848e48579 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt @@ -0,0 +1 @@ +3:1:No property alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.1.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.qml new file mode 100644 index 0000000000..8aab61e49e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property alias a +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.errors.txt new file mode 100644 index 0000000000..93652a7042 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.10.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.qml new file mode 100644 index 0000000000..3ff7b16fd8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.10.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.rectProperty.blah +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.errors.txt new file mode 100644 index 0000000000..3e15628a13 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.errors.txt @@ -0,0 +1 @@ +4:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.2.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.qml new file mode 100644 index 0000000000..b85b2584eb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.2.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property alias a: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.errors.txt new file mode 100644 index 0000000000..fbf1b580e2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.3.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.qml new file mode 100644 index 0000000000..a363373734 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.3.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.rectProperty.x.y +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.errors.txt new file mode 100644 index 0000000000..fbf1b580e2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.4.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.qml new file mode 100644 index 0000000000..cfdfca0590 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.4.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: print("Hello!") +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.errors.txt new file mode 100644 index 0000000000..6f78e599d4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias reference. Unable to find id "otherroot" diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.5.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.qml new file mode 100644 index 0000000000..0c1d5d7ef1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.5.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: otherroot +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.errors.txt new file mode 100644 index 0000000000..93652a7042 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.6.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.qml new file mode 100644 index 0000000000..edfdb24bcc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.6.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.foobar +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.errors.txt new file mode 100644 index 0000000000..93652a7042 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.7.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.qml new file mode 100644 index 0000000000..2a09648d57 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.7.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.nonScriptable +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.errors.txt new file mode 100644 index 0000000000..93652a7042 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.8.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.qml new file mode 100644 index 0000000000..4faa52d250 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.8.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.imaginary.x +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.errors.txt new file mode 100644 index 0000000000..93652a7042 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.errors.txt @@ -0,0 +1 @@ +5:23:Invalid alias location diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.9.qml b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.qml new file mode 100644 index 0000000000..f1839127b0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.9.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + id: root + property alias a: root.floatProperty.x +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.errors.txt new file mode 100644 index 0000000000..492bbb48fa --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.errors.txt @@ -0,0 +1 @@ +5:17:Cannot assign to non-existent property "foo" diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.qml new file mode 100644 index 0000000000..20864b9a41 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.1.qml @@ -0,0 +1,7 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + MyQmlObject.foo: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.errors.txt new file mode 100644 index 0000000000..ff2409bd2d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.errors.txt @@ -0,0 +1 @@ +5:15:Non-existent attached object diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.qml new file mode 100644 index 0000000000..20906de606 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.10.qml @@ -0,0 +1,6 @@ +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + Namespace.MadeUpClass.foo: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.errors.txt new file mode 100644 index 0000000000..fee5050743 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.errors.txt @@ -0,0 +1 @@ +5:15:Not an attached property name diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.qml new file mode 100644 index 0000000000..95add15147 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.11.qml @@ -0,0 +1,7 @@ +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + Namespace.madeUpClass.foo: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.errors.txt new file mode 100644 index 0000000000..189a795837 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.errors.txt @@ -0,0 +1 @@ +4:13:Attached properties cannot be used here diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.qml new file mode 100644 index 0000000000..7de503e766 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.12.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + grouped.MyQmlObject.value: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.errors.txt new file mode 100644 index 0000000000..46d7be2ac3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.errors.txt @@ -0,0 +1 @@ +5:9:Attached properties cannot be used here diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.qml new file mode 100644 index 0000000000..986ab855c5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.13.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyTypeObject { + grouped { + MyQmlObject.value: 10 + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.errors.txt new file mode 100644 index 0000000000..34de769e13 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.errors.txt @@ -0,0 +1 @@ +5:27:Cannot assign to non-existent property "foo" diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.qml new file mode 100644 index 0000000000..050e619ff2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.2.qml @@ -0,0 +1,6 @@ +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + Namespace.MyQmlObject.foo: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.errors.txt new file mode 100644 index 0000000000..05161c4d10 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.errors.txt @@ -0,0 +1 @@ +5:5:Invalid attached object assignment diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.qml new file mode 100644 index 0000000000..24b09a53d5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.3.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + MyQmlObject: 10 +} + + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.errors.txt new file mode 100644 index 0000000000..a208bcfaa7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.errors.txt @@ -0,0 +1 @@ +5:15:Invalid attached object assignment diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.qml new file mode 100644 index 0000000000..fb38ee9536 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.4.qml @@ -0,0 +1,7 @@ +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + Namespace.MyQmlObject: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.errors.txt new file mode 100644 index 0000000000..05161c4d10 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.errors.txt @@ -0,0 +1 @@ +5:5:Invalid attached object assignment diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.qml new file mode 100644 index 0000000000..789e42f7ef --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.5.qml @@ -0,0 +1,7 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + MyQmlObject: QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.errors.txt new file mode 100644 index 0000000000..6770e1f30b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.errors.txt @@ -0,0 +1 @@ +5:5:Non-existent attached object diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.qml new file mode 100644 index 0000000000..9060a55d00 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.6.qml @@ -0,0 +1,7 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + Test.MyQmlObject: QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.errors.txt new file mode 100644 index 0000000000..6770e1f30b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.errors.txt @@ -0,0 +1 @@ +5:5:Non-existent attached object diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.qml new file mode 100644 index 0000000000..47b6cc37d8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.7.qml @@ -0,0 +1,6 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + MyTypeObject.foo: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.errors.txt new file mode 100644 index 0000000000..ff2409bd2d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.errors.txt @@ -0,0 +1 @@ +5:15:Non-existent attached object diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.qml new file mode 100644 index 0000000000..146934f7ac --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.8.qml @@ -0,0 +1,6 @@ +import Test 1.0 as Namespace +import QtQuick 2.0 + +QtObject { + Namespace.MyTypeObject.foo: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.errors.txt new file mode 100644 index 0000000000..6770e1f30b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.errors.txt @@ -0,0 +1 @@ +5:5:Non-existent attached object diff --git a/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.qml b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.qml new file mode 100644 index 0000000000..73724aa6e7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidAttachedProperty.9.qml @@ -0,0 +1,7 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + MadeUpClass.foo: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.errors.txt new file mode 100644 index 0000000000..810fd31b41 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.errors.txt @@ -0,0 +1 @@ +5:5:Invalid grouped property access diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml new file mode 100644 index 0000000000..fa46b8242a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property variant o; + o.blah: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.errors.txt new file mode 100644 index 0000000000..1fcb1b65f5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.errors.txt @@ -0,0 +1 @@ +4:14:Cannot assign a value directly to a grouped property diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.qml new file mode 100644 index 0000000000..41aa3e2923 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.10.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + grouped: "10x10" + grouped.value: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.errors.txt new file mode 100644 index 0000000000..810fd31b41 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.errors.txt @@ -0,0 +1 @@ +5:5:Invalid grouped property access diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml new file mode 100644 index 0000000000..3e516738d6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +QtObject { + property int o; + o.blah: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.errors.txt new file mode 100644 index 0000000000..f6d6f29fbf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.errors.txt @@ -0,0 +1 @@ +4:5:Invalid grouped property access diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.qml new file mode 100644 index 0000000000..0bbfc4f529 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.3.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyQmlObject { + customType.x: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.errors.txt new file mode 100644 index 0000000000..69c68716d9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.errors.txt @@ -0,0 +1 @@ +4:5:Cannot assign to non-existent property "foo" diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.qml new file mode 100644 index 0000000000..134fef9b0a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.4.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyQmlObject { + foo.x: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.errors.txt new file mode 100644 index 0000000000..2c8a970da7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.errors.txt @@ -0,0 +1 @@ +4:18:Property assignment expected diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.qml new file mode 100644 index 0000000000..55cefe66b9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.5.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + rectProperty.x.foo: 100 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.qml new file mode 100644 index 0000000000..9ec33abe7b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.6.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + rectProperty.x: 100 + rectProperty.x: 101 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.errors.txt new file mode 100644 index 0000000000..4a7e3830a8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.errors.txt @@ -0,0 +1 @@ +4:-1:Cannot set properties on nullGrouped as it is null diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.qml new file mode 100644 index 0000000000..977539a357 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.7.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + nullGrouped.script: console.log(1921) +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.errors.txt new file mode 100644 index 0000000000..fa0da21c55 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.errors.txt @@ -0,0 +1 @@ +5:19:Property has already been assigned a value diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.qml new file mode 100644 index 0000000000..56fca9b990 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.8.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + pointProperty: "10x10" + pointProperty.x: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.errors.txt new file mode 100644 index 0000000000..6d837a7222 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.errors.txt @@ -0,0 +1 @@ +5:20:Property has already been assigned a value diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.qml new file mode 100644 index 0000000000..982ab26051 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.9.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + pointProperty.x: 10 + pointProperty: "10x10" +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.2.errors.txt new file mode 100644 index 0000000000..2c6b8bf0f3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.2.errors.txt @@ -0,0 +1,2 @@ +3:9:Invalid empty ID + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.2.qml b/tests/auto/qml/qqmllanguage/data/invalidID.2.qml new file mode 100644 index 0000000000..4fb3b298dd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.2.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: "" +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.3.errors.txt new file mode 100644 index 0000000000..bb811cfe9d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.3.errors.txt @@ -0,0 +1 @@ +3:5:Invalid use of id property diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.3.qml b/tests/auto/qml/qqmllanguage/data/invalidID.3.qml new file mode 100644 index 0000000000..668417286b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.3.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id.other: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.4.errors.txt new file mode 100644 index 0000000000..c721fe91bf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.4.errors.txt @@ -0,0 +1 @@ +4:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.4.qml b/tests/auto/qml/qqmllanguage/data/invalidID.4.qml new file mode 100644 index 0000000000..86010bf792 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.4.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyQmlObject { + id: hello + id: world +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.5.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.5.errors.txt new file mode 100644 index 0000000000..c167de382e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.5.errors.txt @@ -0,0 +1 @@ +2:20:Invalid import qualifier ID diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.5.qml b/tests/auto/qml/qqmllanguage/data/invalidID.5.qml new file mode 100644 index 0000000000..5b92a1a0eb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.5.qml @@ -0,0 +1,6 @@ +import Test 1.0 +import Test 1.0 as hello +MyQmlObject { + id: hello +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.6.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.6.errors.txt new file mode 100644 index 0000000000..7251de118f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.6.errors.txt @@ -0,0 +1 @@ +3:9:IDs cannot start with an uppercase letter diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.6.qml b/tests/auto/qml/qqmllanguage/data/invalidID.6.qml new file mode 100644 index 0000000000..62187d9473 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.6.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: StartsWithUpperCase +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.7.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.7.errors.txt new file mode 100644 index 0000000000..e4fd1db3f0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.7.errors.txt @@ -0,0 +1 @@ +3:9:ID illegally masks global JavaScript property diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.7.qml b/tests/auto/qml/qqmllanguage/data/invalidID.7.qml new file mode 100644 index 0000000000..d4bc539650 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.7.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: gc +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.8.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.8.errors.txt new file mode 100644 index 0000000000..b03ec6ccea --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.8.errors.txt @@ -0,0 +1 @@ +3:9:IDs must contain only letters, numbers, and underscores diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.8.qml b/tests/auto/qml/qqmllanguage/data/invalidID.8.qml new file mode 100644 index 0000000000..1ea615c32e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.8.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: hello.world +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.9.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.9.errors.txt new file mode 100644 index 0000000000..c010e79492 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.9.errors.txt @@ -0,0 +1 @@ +3:9:IDs must start with a letter or underscore diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.9.qml b/tests/auto/qml/qqmllanguage/data/invalidID.9.qml new file mode 100644 index 0000000000..57474b7212 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.9.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyQmlObject { + id: "3hello" +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidID.errors.txt new file mode 100644 index 0000000000..c010e79492 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.errors.txt @@ -0,0 +1 @@ +3:9:IDs must start with a letter or underscore diff --git a/tests/auto/qml/qqmllanguage/data/invalidID.qml b/tests/auto/qml/qqmllanguage/data/invalidID.qml new file mode 100644 index 0000000000..04db3eb67c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidID.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + id: 1 +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidImportID.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidImportID.errors.txt new file mode 100644 index 0000000000..034e937366 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidImportID.errors.txt @@ -0,0 +1 @@ +2:23:Invalid import qualifier ID diff --git a/tests/auto/qml/qqmllanguage/data/invalidImportID.qml b/tests/auto/qml/qqmllanguage/data/invalidImportID.qml new file mode 100644 index 0000000000..37e7c5d4d0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidImportID.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 +import QtQuick 2.0 as qt + +QtObject {} diff --git a/tests/auto/qml/qqmllanguage/data/invalidOn.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidOn.errors.txt new file mode 100644 index 0000000000..b4210a11fc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidOn.errors.txt @@ -0,0 +1 @@ +3:5:"MyQmlObject" cannot operate on "value" diff --git a/tests/auto/qml/qqmllanguage/data/invalidOn.qml b/tests/auto/qml/qqmllanguage/data/invalidOn.qml new file mode 100644 index 0000000000..d748bf4755 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidOn.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + MyQmlObject on value {} +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidProperty.errors.txt new file mode 100644 index 0000000000..e9e27c479b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidProperty.errors.txt @@ -0,0 +1 @@ +4:18:Illegal property name diff --git a/tests/auto/qml/qqmllanguage/data/invalidProperty.qml b/tests/auto/qml/qqmllanguage/data/invalidProperty.qml new file mode 100644 index 0000000000..f9b322e35c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidProperty.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int parseInt +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.errors.txt new file mode 100644 index 0000000000..eff7c0e6c4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.errors.txt @@ -0,0 +1 @@ +1:1:Expected a qualified name id diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.1.qml @@ -0,0 +1,2 @@ +{ +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.errors.txt new file mode 100644 index 0000000000..4bcc948e92 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.errors.txt @@ -0,0 +1 @@ +1:1:Expected type name diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.2.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.qml new file mode 100644 index 0000000000..427827ca89 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.2.qml @@ -0,0 +1,2 @@ +foo { +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.errors.txt new file mode 100644 index 0000000000..fdce1abf06 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.errors.txt @@ -0,0 +1 @@ +3:5:Expected type name diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.3.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.qml new file mode 100644 index 0000000000..65e93ed55d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.3.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 as Foo + +Foo.foo { +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.errors.txt new file mode 100644 index 0000000000..3b90f573a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.errors.txt @@ -0,0 +1 @@ +3:1:Bar.Item - Bar is not a namespace diff --git a/tests/auto/qml/qqmllanguage/data/invalidRoot.4.qml b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.qml new file mode 100644 index 0000000000..ba4c8ae1f7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidRoot.4.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 as Foo + +Bar.Item { +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.errors.txt new file mode 100644 index 0000000000..4bcc948e92 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.errors.txt @@ -0,0 +1 @@ +1:1:Expected type name diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.qml new file mode 100644 index 0000000000..658b72d9f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.1.qml @@ -0,0 +1,2 @@ +item { +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.errors.txt new file mode 100644 index 0000000000..fdce1abf06 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.errors.txt @@ -0,0 +1 @@ +3:5:Expected type name diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.qml new file mode 100644 index 0000000000..9c83238282 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.2.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 as Foo + +Foo.item { +} + diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.errors.txt new file mode 100644 index 0000000000..208df2b84a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.errors.txt @@ -0,0 +1 @@ +5:9:Expected type name diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.qml new file mode 100644 index 0000000000..2f7027081e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.3.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 as Foo + +Foo.Item { + + Foo.item { + } +} diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.errors.txt new file mode 100644 index 0000000000..3b90f573a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.errors.txt @@ -0,0 +1 @@ +3:1:Bar.Item - Bar is not a namespace diff --git a/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.qml b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.qml new file mode 100644 index 0000000000..ba4c8ae1f7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/invalidTypeName.4.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 as Foo + +Bar.Item { +} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js new file mode 100644 index 0000000000..c7b3c8b6ca --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.1.6.js @@ -0,0 +1,5 @@ +var major = 1 +var minor = 6 + +function greeting() { return "Good news, everybody!" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js new file mode 100644 index 0000000000..b90033eeb4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/FirstAPI.js @@ -0,0 +1,5 @@ +var major = 1 +var minor = 0 + +function greeting() { return "Hello" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js new file mode 100644 index 0000000000..b802477cb6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/SecondAPI.js @@ -0,0 +1,5 @@ +var major = 1 +var minor = 5 + +function greeting() { return "Howdy" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir new file mode 100644 index 0000000000..083afb051c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule.1.6/qmldir @@ -0,0 +1,3 @@ +FirstAPI 1.0 FirstAPI.js +FirstAPI 1.6 FirstAPI.1.6.js +SecondAPI 1.5 SecondAPI.js diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js new file mode 100644 index 0000000000..b90033eeb4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/FirstAPI.js @@ -0,0 +1,5 @@ +var major = 1 +var minor = 0 + +function greeting() { return "Hello" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js new file mode 100644 index 0000000000..b802477cb6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/SecondAPI.js @@ -0,0 +1,5 @@ +var major = 1 +var minor = 5 + +function greeting() { return "Howdy" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/qmldir new file mode 100644 index 0000000000..5c3acebd39 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/PureJsModule/qmldir @@ -0,0 +1,2 @@ +FirstAPI 1.0 FirstAPI.js +SecondAPI 1.5 SecondAPI.js diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js new file mode 100644 index 0000000000..efac613fc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/SomeAPI.js @@ -0,0 +1,5 @@ +var major = 9 +var minor = 0 + +function greeting() { return "Hey hey hey" } + diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir new file mode 100644 index 0000000000..5c1b182028 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/VersionedOnlyJsModule.9.0/qmldir @@ -0,0 +1 @@ +SomeAPI 9.0 SomeAPI.js diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest.qml new file mode 100644 index 0000000000..56daa9c09a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 as Qt47 +Qt47.Rectangle {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml new file mode 100644 index 0000000000..59df88216e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Text {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/LocalLast.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/LocalLast.qml new file mode 100644 index 0000000000..26a5d6bba9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/LocalLast.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Rectangle {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml new file mode 100644 index 0000000000..ed1b09e419 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Image {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/qmldir new file mode 100644 index 0000000000..d15720a154 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest/qmldir @@ -0,0 +1,4 @@ +Rectangle 1.5 InstalledTest2.qml +LocalLast 1.0 LocalLast.qml +InstalledTest 1.4 InstalledTest2.qml +InstalledTest 1.0 InstalledTest.qml diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml new file mode 100644 index 0000000000..56daa9c09a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 as Qt47 +Qt47.Rectangle {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml new file mode 100644 index 0000000000..59df88216e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Text {} diff --git a/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/qmldir b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/qmldir new file mode 100644 index 0000000000..b301226099 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/lib/com/nokia/installedtest0/qmldir @@ -0,0 +1,2 @@ +InstalledTest 1.4 InstalledTest2.qml +InstalledTestTP 0.0 InstalledTest.qml diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.1.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.1.errors.txt new file mode 100644 index 0000000000..35d2d3510e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.1.errors.txt @@ -0,0 +1 @@ +4:24:Cannot assign object to list diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.1.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.1.qml new file mode 100644 index 0000000000..1af190633d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.1.qml @@ -0,0 +1,6 @@ +import Test 1.0 +import QtQuick 2.0 +MyContainer { + containerChildren: QtObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.2.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.2.errors.txt new file mode 100644 index 0000000000..8b40aa3ebb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.2.errors.txt @@ -0,0 +1,2 @@ +3:15:Cannot assign primitives to lists + diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.2.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.2.qml new file mode 100644 index 0000000000..e3baadb46c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyContainer { + children: 2 +} diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.3.errors.txt b/tests/auto/qml/qqmllanguage/data/listAssignment.3.errors.txt new file mode 100644 index 0000000000..c721fe91bf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.3.errors.txt @@ -0,0 +1 @@ +4:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/listAssignment.3.qml b/tests/auto/qml/qqmllanguage/data/listAssignment.3.qml new file mode 100644 index 0000000000..00c4c6b543 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listAssignment.3.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainer { + children: childBinding.expression + children: childBinding2.expression +} + diff --git a/tests/auto/qml/qqmllanguage/data/listItemDeleteSelf.qml b/tests/auto/qml/qqmllanguage/data/listItemDeleteSelf.qml new file mode 100644 index 0000000000..74439c66d4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listItemDeleteSelf.qml @@ -0,0 +1,38 @@ +import QtQuick 2.0 + +Item { + ListModel { + id: fruitModel + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } + } + + Component { + id: fruitDelegate + Item { + width: 200; height: 50 + Text { text: name } + Text { text: '$'+cost; anchors.right: parent.right } + MouseArea { + anchors.fill: parent + onClicked: fruitModel.remove(index) + } + } + } + + ListView { + model: fruitModel + delegate: fruitDelegate + anchors.fill: parent + } +} diff --git a/tests/auto/qml/qqmllanguage/data/listProperties.qml b/tests/auto/qml/qqmllanguage/data/listProperties.qml new file mode 100644 index 0000000000..dcfe37d6fc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/listProperties.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +QtObject { + property list<QtObject> listProperty + property int test: listProperty.length + + listProperty: [ QtObject{}, QtObject {} ] +} + diff --git a/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.errors.txt b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.errors.txt new file mode 100644 index 0000000000..07d05d3d21 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.errors.txt @@ -0,0 +1 @@ +3:1:MyQmlObject is not a type diff --git a/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.qml b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.qml new file mode 100644 index 0000000000..717ca76f05 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/majorVersionIsolation.qml @@ -0,0 +1,4 @@ +import Test.Version 2.0 + +MyQmlObject { +} diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.errors.txt new file mode 100644 index 0000000000..29342dc46e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.errors.txt @@ -0,0 +1 @@ +8:5:"MyRevisionedClass.prop2" is not available in Test 1.0. diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.qml new file mode 100644 index 0000000000..fbb37705a1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.1.qml @@ -0,0 +1,9 @@ +// Check that a property in a later revision (prop2) cannot be assigned +import QtQuick 2.0 +import Test 1.0 + +MyRevisionedClass +{ + prop1: 1 + prop2: 2 +} diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.errors.txt new file mode 100644 index 0000000000..57b5764b08 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.errors.txt @@ -0,0 +1 @@ +6:5:"MyRevisionedClass.onSignal2" is not available in Test 1.0. diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.qml new file mode 100644 index 0000000000..8da7a2558f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyRevisionedClass +{ + onSignal1: prop1 = 2 + onSignal2: prop1 = 3 +} diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.errors.txt new file mode 100644 index 0000000000..45364a044f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.errors.txt @@ -0,0 +1 @@ +9:5:"MyRevisionedClass.propD" is not available in Test 1.1. diff --git a/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.qml b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.qml new file mode 100644 index 0000000000..195be2116a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/metaobjectRevision.3.qml @@ -0,0 +1,10 @@ +import Test 1.1 + +MyRevisionedClass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is in rev 1 of MyRevisionedClassUnregistered, but not registered in 1.1 + propD: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/method.1.errors.txt b/tests/auto/qml/qqmllanguage/data/method.1.errors.txt new file mode 100644 index 0000000000..98d0b9cefb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/method.1.errors.txt @@ -0,0 +1 @@ +4:14:Method names cannot begin with an upper case letter diff --git a/tests/auto/qml/qqmllanguage/data/method.1.qml b/tests/auto/qml/qqmllanguage/data/method.1.qml new file mode 100644 index 0000000000..a888b1aaf4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/method.1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + function MyMethod() {} +} diff --git a/tests/auto/qml/qqmllanguage/data/missingObject.errors.txt b/tests/auto/qml/qqmllanguage/data/missingObject.errors.txt new file mode 100644 index 0000000000..b31b562de1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingObject.errors.txt @@ -0,0 +1 @@ +1:10:Expected token `{' diff --git a/tests/auto/qml/qqmllanguage/data/missingObject.qml b/tests/auto/qml/qqmllanguage/data/missingObject.qml new file mode 100644 index 0000000000..2f17045869 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingObject.qml @@ -0,0 +1 @@ +something: 24 diff --git a/tests/auto/qml/qqmllanguage/data/missingSignal.errors.txt b/tests/auto/qml/qqmllanguage/data/missingSignal.errors.txt new file mode 100644 index 0000000000..f562246288 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingSignal.errors.txt @@ -0,0 +1 @@ +4:5:Cannot assign to non-existent property "onClicked" diff --git a/tests/auto/qml/qqmllanguage/data/missingSignal.qml b/tests/auto/qml/qqmllanguage/data/missingSignal.qml new file mode 100644 index 0000000000..92aefef8c4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingSignal.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import QtQuick 2.0 +QtObject { + onClicked: console.log("Hello world!") +} diff --git a/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.errors.txt new file mode 100644 index 0000000000..caf7e55ba2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.errors.txt @@ -0,0 +1 @@ +4:18:Cannot assign to non-existent property "foo" diff --git a/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.qml b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.qml new file mode 100644 index 0000000000..9a0fa6a26b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/missingValueTypeProperty.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + rectProperty.foo: 9 +} diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.1.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.1.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.1.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.1.qml b/tests/auto/qml/qqmllanguage/data/multiSet.1.qml new file mode 100644 index 0000000000..649c49ee3a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.1.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: 11 +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.10.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.10.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.10.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.10.qml b/tests/auto/qml/qqmllanguage/data/multiSet.10.qml new file mode 100644 index 0000000000..bc21db98f8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.10.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + property int a: 10 + a: 11 +} diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.11.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.11.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.11.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.11.qml b/tests/auto/qml/qqmllanguage/data/multiSet.11.qml new file mode 100644 index 0000000000..7d03139056 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.11.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + rectProperty.x: 10 + rectProperty.x: 11 +} diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.2.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.2.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.2.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.2.qml b/tests/auto/qml/qqmllanguage/data/multiSet.2.qml new file mode 100644 index 0000000000..abcd216744 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: a + 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.3.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.3.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.3.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.3.qml b/tests/auto/qml/qqmllanguage/data/multiSet.3.qml new file mode 100644 index 0000000000..77eaba0b32 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.3.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: a + 10 + intProperty: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.4.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.4.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.4.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.4.qml b/tests/auto/qml/qqmllanguage/data/multiSet.4.qml new file mode 100644 index 0000000000..c16d04fea6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.4.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyTypeObject { + intProperty: 10 + intProperty: MyTypeObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.5.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.5.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.5.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.5.qml b/tests/auto/qml/qqmllanguage/data/multiSet.5.qml new file mode 100644 index 0000000000..2980c5b28c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.5.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyContainer { + children: MyContainer {} + children: MyContainer {} +} diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.6.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.6.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.6.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.6.qml b/tests/auto/qml/qqmllanguage/data/multiSet.6.qml new file mode 100644 index 0000000000..492c720edc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.6.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyContainer { + children: MyContainer {} + children: [ MyContainer {}, MyContainer {} ] +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.7.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.7.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.7.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.7.qml b/tests/auto/qml/qqmllanguage/data/multiSet.7.qml new file mode 100644 index 0000000000..2a9c1d0de8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.7.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyContainer { + children: [ MyContainer {}, MyContainer {} ] + children: MyContainer {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.8.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.8.errors.txt new file mode 100644 index 0000000000..450fc163bd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.8.errors.txt @@ -0,0 +1 @@ +6:9:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.8.qml b/tests/auto/qml/qqmllanguage/data/multiSet.8.qml new file mode 100644 index 0000000000..052437ea18 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.8.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyTypeObject { + grouped { + value: 10 + value: 11 + } +} diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.9.errors.txt b/tests/auto/qml/qqmllanguage/data/multiSet.9.errors.txt new file mode 100644 index 0000000000..e1f7ec5bc2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.9.errors.txt @@ -0,0 +1 @@ +5:5:Property value set multiple times diff --git a/tests/auto/qml/qqmllanguage/data/multiSet.9.qml b/tests/auto/qml/qqmllanguage/data/multiSet.9.qml new file mode 100644 index 0000000000..e2e954f778 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/multiSet.9.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + grouped.value: 10 + grouped.value: 11 +} diff --git a/tests/auto/qml/qqmllanguage/data/nestedComponentRoots.qml b/tests/auto/qml/qqmllanguage/data/nestedComponentRoots.qml new file mode 100644 index 0000000000..5e6c2a91c9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nestedComponentRoots.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +NestedComponentRoot { +} diff --git a/tests/auto/qml/qqmllanguage/data/nestedErrors.errors.txt b/tests/auto/qml/qqmllanguage/data/nestedErrors.errors.txt new file mode 100644 index 0000000000..53e752b641 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nestedErrors.errors.txt @@ -0,0 +1,2 @@ +4:5:Type NestedErrorsType unavailable +4:8:Invalid property assignment: number expected diff --git a/tests/auto/qml/qqmllanguage/data/nestedErrors.qml b/tests/auto/qml/qqmllanguage/data/nestedErrors.qml new file mode 100644 index 0000000000..cc1df4d181 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nestedErrors.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Item { + NestedErrorsType {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/noCreation.errors.txt b/tests/auto/qml/qqmllanguage/data/noCreation.errors.txt new file mode 100644 index 0000000000..23cd3f3504 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/noCreation.errors.txt @@ -0,0 +1 @@ +3:1:Keys is only available via attached properties diff --git a/tests/auto/qml/qqmllanguage/data/noCreation.qml b/tests/auto/qml/qqmllanguage/data/noCreation.qml new file mode 100644 index 0000000000..28852f1a0c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/noCreation.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +Keys { +} diff --git a/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.errors.txt new file mode 100644 index 0000000000..cdfa4b2ef2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.errors.txt @@ -0,0 +1 @@ +4:5:Cannot assign to non-existent property "nonScriptable" diff --git a/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.qml b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.qml new file mode 100644 index 0000000000..bd59bc80f9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonScriptableProperty.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyQmlObject { + nonScriptable: 11 +} diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.errors.txt new file mode 100644 index 0000000000..6bfce9a2c9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.errors.txt @@ -0,0 +1 @@ +2:15:Cannot assign to non-existent property "something" diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.qml new file mode 100644 index 0000000000..df7406ce98 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.1.qml @@ -0,0 +1,2 @@ +import Test 1.0 +MyQmlObject { something: 24 } diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.errors.txt new file mode 100644 index 0000000000..4b30056d59 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.errors.txt @@ -0,0 +1 @@ +3:5:Cannot assign to non-existent property "something" diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.qml new file mode 100644 index 0000000000..06ccd37905 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: 24 +} diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.errors.txt new file mode 100644 index 0000000000..4b30056d59 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.errors.txt @@ -0,0 +1 @@ +3:5:Cannot assign to non-existent property "something" diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml new file mode 100644 index 0000000000..5b08608862 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: 1 + 1 +} diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.errors.txt new file mode 100644 index 0000000000..4b30056d59 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.errors.txt @@ -0,0 +1 @@ +3:5:Cannot assign to non-existent property "something" diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.qml new file mode 100644 index 0000000000..65791919ba --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.4.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + something: ; +} diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.errors.txt new file mode 100644 index 0000000000..c07f2b99a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.errors.txt @@ -0,0 +1 @@ +3:5:Expected a qualified name id diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml new file mode 100644 index 0000000000..37af05731e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.5.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + 24 +} diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.errors.txt new file mode 100644 index 0000000000..89925b74c2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.errors.txt @@ -0,0 +1 @@ +3:5:Cannot assign to non-existent default property diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.qml new file mode 100644 index 0000000000..5cd55d0856 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.6.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/notAvailable.errors.txt b/tests/auto/qml/qqmllanguage/data/notAvailable.errors.txt new file mode 100644 index 0000000000..af95a53cc7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/notAvailable.errors.txt @@ -0,0 +1 @@ +3:1:UnavailableType is unavailable for testing diff --git a/tests/auto/qml/qqmllanguage/data/notAvailable.qml b/tests/auto/qml/qqmllanguage/data/notAvailable.qml new file mode 100644 index 0000000000..7c3c7ee08d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/notAvailable.qml @@ -0,0 +1,4 @@ +import Test 1.0 + +UnavailableType { +} diff --git a/tests/auto/qml/qqmllanguage/data/nullDotProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/nullDotProperty.errors.txt new file mode 100644 index 0000000000..07a40949cd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nullDotProperty.errors.txt @@ -0,0 +1 @@ +3:-1:Cannot set properties on obj as it is null diff --git a/tests/auto/qml/qqmllanguage/data/nullDotProperty.qml b/tests/auto/qml/qqmllanguage/data/nullDotProperty.qml new file mode 100644 index 0000000000..4e36779b5c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nullDotProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyDotPropertyObject { + obj.value: 1 +} diff --git a/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.errors.txt new file mode 100644 index 0000000000..db7d9c0f60 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.errors.txt @@ -0,0 +1 @@ +4:18:Unexpected object assignment diff --git a/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.qml b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.qml new file mode 100644 index 0000000000..99247735dd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/objectValueTypeProperty.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + rectProperty.x: MyTypeObject {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/onCompleted.qml b/tests/auto/qml/qqmllanguage/data/onCompleted.qml new file mode 100644 index 0000000000..89e6777f8a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/onCompleted.qml @@ -0,0 +1,17 @@ +import Test 1.0 +import QtQuick 2.0 + +MyTypeObject { + // We set a and b to ensure that onCompleted is executed after bindings and + // constants have been assigned + property int a: Math.min(6, 7) + Component.onCompleted: console.log("Completed " + a + " " + nestedObject.b) + + objectProperty: OnCompletedType { + qmlobjectProperty: MyQmlObject { + id: nestedObject + property int b: 10 + Component.onCompleted: console.log("Completed " + a + " " + nestedObject.b) + } + } +} diff --git a/tests/auto/qml/qqmllanguage/data/onDestruction.qml b/tests/auto/qml/qqmllanguage/data/onDestruction.qml new file mode 100644 index 0000000000..7d6da260b4 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/onDestruction.qml @@ -0,0 +1,17 @@ +import Test 1.0 +import QtQuick 2.0 + +MyTypeObject { + // We set a and b to ensure that onCompleted is executed after bindings and + // constants have been assigned + property int a: Math.min(6, 7) + Component.onDestruction: console.log("Destruction " + a + " " + nestedObject.b) + + objectProperty: OnDestructionType { + qmlobjectProperty: MyQmlObject { + id: nestedObject + property int b: 10 + Component.onDestruction: console.log("Destruction " + a + " " + nestedObject.b) + } + } +} diff --git a/tests/auto/qml/qqmllanguage/data/property.1.errors.txt b/tests/auto/qml/qqmllanguage/data/property.1.errors.txt new file mode 100644 index 0000000000..3ae6c4601b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.1.errors.txt @@ -0,0 +1 @@ +4:14:Expected property type diff --git a/tests/auto/qml/qqmllanguage/data/property.1.qml b/tests/auto/qml/qqmllanguage/data/property.1.qml new file mode 100644 index 0000000000..6b43e6cc89 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property blah a; +} diff --git a/tests/auto/qml/qqmllanguage/data/property.2.errors.txt b/tests/auto/qml/qqmllanguage/data/property.2.errors.txt new file mode 100644 index 0000000000..a18e21a01c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.2.errors.txt @@ -0,0 +1 @@ +4:14:Unexpected property type modifier diff --git a/tests/auto/qml/qqmllanguage/data/property.2.qml b/tests/auto/qml/qqmllanguage/data/property.2.qml new file mode 100644 index 0000000000..e6aa00e730 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.2.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property invalidmodifier<int> a; +} + diff --git a/tests/auto/qml/qqmllanguage/data/property.3.errors.txt b/tests/auto/qml/qqmllanguage/data/property.3.errors.txt new file mode 100644 index 0000000000..5e09a25b57 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.3.errors.txt @@ -0,0 +1 @@ +4:14:Invalid property type modifier diff --git a/tests/auto/qml/qqmllanguage/data/property.3.qml b/tests/auto/qml/qqmllanguage/data/property.3.qml new file mode 100644 index 0000000000..978c1aa80b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.3.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +QtObject { + property invalidmodifier<QtObject> a; +} + + diff --git a/tests/auto/qml/qqmllanguage/data/property.4.errors.txt b/tests/auto/qml/qqmllanguage/data/property.4.errors.txt new file mode 100644 index 0000000000..b447186849 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.4.errors.txt @@ -0,0 +1 @@ +5:1:Syntax error diff --git a/tests/auto/qml/qqmllanguage/data/property.4.qml b/tests/auto/qml/qqmllanguage/data/property.4.qml new file mode 100644 index 0000000000..bb94e84244 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.4.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + readonly property int a +} diff --git a/tests/auto/qml/qqmllanguage/data/property.6.errors.txt b/tests/auto/qml/qqmllanguage/data/property.6.errors.txt new file mode 100644 index 0000000000..985c083cc3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.6.errors.txt @@ -0,0 +1 @@ +4:18:Property names cannot begin with an upper case letter diff --git a/tests/auto/qml/qqmllanguage/data/property.6.qml b/tests/auto/qml/qqmllanguage/data/property.6.qml new file mode 100644 index 0000000000..88f493f9a9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.6.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property int Hello +} + diff --git a/tests/auto/qml/qqmllanguage/data/property.7.errors.txt b/tests/auto/qml/qqmllanguage/data/property.7.errors.txt new file mode 100644 index 0000000000..985c083cc3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.7.errors.txt @@ -0,0 +1 @@ +4:18:Property names cannot begin with an upper case letter diff --git a/tests/auto/qml/qqmllanguage/data/property.7.qml b/tests/auto/qml/qqmllanguage/data/property.7.qml new file mode 100644 index 0000000000..05eb319947 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/property.7.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int Hello: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/propertyInit.1.qml b/tests/auto/qml/qqmllanguage/data/propertyInit.1.qml new file mode 100644 index 0000000000..7d6fea24db --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/propertyInit.1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int test: { var _ = 1; _ } +} diff --git a/tests/auto/qml/qqmllanguage/data/propertyInit.2.qml b/tests/auto/qml/qqmllanguage/data/propertyInit.2.qml new file mode 100644 index 0000000000..fa690ba6bc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/propertyInit.2.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property int test: if (b == 1) 123; else 321; + property int b: 1 +} diff --git a/tests/auto/qml/qqmllanguage/data/propertyValueSource.2.qml b/tests/auto/qml/qqmllanguage/data/propertyValueSource.2.qml new file mode 100644 index 0000000000..e48526abec --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/propertyValueSource.2.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + MyCompositeValueSource on intProperty {} +} + diff --git a/tests/auto/qml/qqmllanguage/data/propertyValueSource.qml b/tests/auto/qml/qqmllanguage/data/propertyValueSource.qml new file mode 100644 index 0000000000..22aa68250e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/propertyValueSource.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + MyPropertyValueSource on intProperty {} +} diff --git a/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml new file mode 100644 index 0000000000..55c507f67e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.1.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import QtQuick 2.0 +QtObject { +} + diff --git a/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml new file mode 100644 index 0000000000..db8a3da2b2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qmlAttachedPropertiesObjectMethod.2.qml @@ -0,0 +1,6 @@ +import Test 1.0 +import QtQuick 2.0 +QtObject { + MyQmlObject.value: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/LocalInternal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/LocalInternal.qml new file mode 100644 index 0000000000..4ce04c46d2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/LocalInternal.qml @@ -0,0 +1,3 @@ +import QtQuick 2.0 + +Image { source: "pics/blue.png" } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/Test.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/Test.qml new file mode 100644 index 0000000000..f789a905f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/Test.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestLocal.qml new file mode 100644 index 0000000000..11443ca6d5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestLocal.qml @@ -0,0 +1 @@ +LocalInternal {} diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestNamed.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestNamed.qml new file mode 100644 index 0000000000..672cb8f201 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestNamed.qml @@ -0,0 +1 @@ +NamedLocal { } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestSubDir.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestSubDir.qml new file mode 100644 index 0000000000..0dfede4093 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/TestSubDir.qml @@ -0,0 +1,2 @@ +import "subdir" +SubTest { } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/UndeclaredLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/UndeclaredLocal.qml new file mode 100644 index 0000000000..4ce04c46d2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/UndeclaredLocal.qml @@ -0,0 +1,3 @@ +import QtQuick 2.0 + +Image { source: "pics/blue.png" } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/WrongTestLocal.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/WrongTestLocal.qml new file mode 100644 index 0000000000..8dcb7be231 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/WrongTestLocal.qml @@ -0,0 +1 @@ +UndeclaredInternal {} diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/noqmldir/Test.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/noqmldir/Test.qml new file mode 100644 index 0000000000..f789a905f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/noqmldir/Test.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/pics/blue.png b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/pics/blue.png Binary files differnew file mode 100644 index 0000000000..46f815f1ed --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/pics/blue.png diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/qmldir b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/qmldir new file mode 100644 index 0000000000..60150f837c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/qmldir @@ -0,0 +1,5 @@ +Test Test.qml +TestSubDir TestSubDir.qml +TestLocal TestLocal.qml +NamedLocal LocalInternal.qml +internal LocalInternal LocalInternal.qml diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/SubTest.qml b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/SubTest.qml new file mode 100644 index 0000000000..1480ae8683 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/SubTest.qml @@ -0,0 +1,3 @@ +import QtQuick 2.0 + +Text {} diff --git a/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/qmldir b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/qmldir new file mode 100644 index 0000000000..a54f7dfa61 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/qtest/qml/qqmllanguage/subdir/qmldir @@ -0,0 +1 @@ +SubTest SubTest.qml diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.1.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.1.errors.txt new file mode 100644 index 0000000000..b8c34042be --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.1.errors.txt @@ -0,0 +1 @@ +3:21:Invalid property assignment: "readOnlyString" is a read-only property diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.1.qml b/tests/auto/qml/qqmllanguage/data/readOnly.1.qml new file mode 100644 index 0000000000..60757bd005 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.1.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + readOnlyString: "Hello World" +} diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.2.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.2.errors.txt new file mode 100644 index 0000000000..d857a0440e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.2.errors.txt @@ -0,0 +1 @@ +3:5:Invalid property assignment: "readOnlyString" is a read-only property diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.2.qml b/tests/auto/qml/qqmllanguage/data/readOnly.2.qml new file mode 100644 index 0000000000..8f1633cc11 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + readOnlyString: "Hello" + "World" +} diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.3.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.3.errors.txt new file mode 100644 index 0000000000..c7e9e1bb2f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.3.errors.txt @@ -0,0 +1 @@ +6:36:Invalid property assignment: "objAlias" is a read-only property diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.3.qml b/tests/auto/qml/qqmllanguage/data/readOnly.3.qml new file mode 100644 index 0000000000..e3c56b701a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.3.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import QtQuick 2.0 + +QtObject { + property variant child + child: HelperAlias { objAlias: QtObject {} } +} + diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.4.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.4.errors.txt new file mode 100644 index 0000000000..d857a0440e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.4.errors.txt @@ -0,0 +1 @@ +3:5:Invalid property assignment: "readOnlyString" is a read-only property diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.4.qml b/tests/auto/qml/qqmllanguage/data/readOnly.4.qml new file mode 100644 index 0000000000..5338ac77bc --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.4.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + MyPropertyValueSource on readOnlyString {} +} diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.5.errors.txt b/tests/auto/qml/qqmllanguage/data/readOnly.5.errors.txt new file mode 100644 index 0000000000..e71ae4447c --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.5.errors.txt @@ -0,0 +1 @@ +2:23:Invalid property assignment: "readOnlyProperty" is a read-only property diff --git a/tests/auto/qml/qqmllanguage/data/readOnly.5.qml b/tests/auto/qml/qqmllanguage/data/readOnly.5.qml new file mode 100644 index 0000000000..d80b27a1e3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readOnly.5.qml @@ -0,0 +1,3 @@ +ReadOnlyType { + readOnlyProperty: 13 +} diff --git a/tests/auto/qml/qqmllanguage/data/readonly.qml b/tests/auto/qml/qqmllanguage/data/readonly.qml new file mode 100644 index 0000000000..493a9ad502 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/readonly.qml @@ -0,0 +1,17 @@ +import Test 1.0 + +MyQmlObject { + property int testData: 9 + property alias testData2: myObject.test1 + + readonly property int test1: 10 + readonly property int test2: testData + 9 + readonly property alias test3: myObject.test1 + + + property variant dummy: MyQmlObject { + id: myObject + property int test1: 13 + } +} + diff --git a/tests/auto/qml/qqmllanguage/data/registrationOrder.qml b/tests/auto/qml/qqmllanguage/data/registrationOrder.qml new file mode 100644 index 0000000000..14217ad521 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/registrationOrder.qml @@ -0,0 +1,4 @@ +import Test.VersionOrder 2.0 + +MyQmlObject { +} diff --git a/tests/auto/qml/qqmllanguage/data/remoteLoadCrash.qml b/tests/auto/qml/qqmllanguage/data/remoteLoadCrash.qml new file mode 100644 index 0000000000..5f237d39a2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/remoteLoadCrash.qml @@ -0,0 +1,3 @@ +import QtQuick 2.0 +Text { +} diff --git a/tests/auto/qml/qqmllanguage/data/revisions11.qml b/tests/auto/qml/qqmllanguage/data/revisions11.qml new file mode 100644 index 0000000000..823439acdd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/revisions11.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 +import Test 1.1 + +MyRevisionedClass +{ + prop1: 1 + prop2: 10 + + onSignal2: prop2 = 3 +} diff --git a/tests/auto/qml/qqmllanguage/data/revisionsbasesub11.qml b/tests/auto/qml/qqmllanguage/data/revisionsbasesub11.qml new file mode 100644 index 0000000000..78ab51a4b7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/revisionsbasesub11.qml @@ -0,0 +1,16 @@ +import QtQuick 2.0 +import Test 1.1 + +MyRevisionedSubclass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is not registered in 1.1 + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/qml/qqmllanguage/data/revisionssub11.qml b/tests/auto/qml/qqmllanguage/data/revisionssub11.qml new file mode 100644 index 0000000000..d00758387e --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/revisionssub11.qml @@ -0,0 +1,12 @@ +import QtQuick 2.0 +import Test 1.1 + +MyRevisionedSubclass +{ + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/qml/qqmllanguage/data/rootAsQmlComponent.qml b/tests/auto/qml/qqmllanguage/data/rootAsQmlComponent.qml new file mode 100644 index 0000000000..8d72cd3844 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/rootAsQmlComponent.qml @@ -0,0 +1,6 @@ +import Test 1.0 +MyContainerComponent { + x: 11 + MyQmlObject {} + MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/scriptString.1.errors.txt b/tests/auto/qml/qqmllanguage/data/scriptString.1.errors.txt new file mode 100644 index 0000000000..14463e0941 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString.1.errors.txt @@ -0,0 +1 @@ +4:21:Invalid property assignment: script expected diff --git a/tests/auto/qml/qqmllanguage/data/scriptString.1.qml b/tests/auto/qml/qqmllanguage/data/scriptString.1.qml new file mode 100644 index 0000000000..f07d2231fe --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString.1.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: MyTypeObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/scriptString.2.errors.txt b/tests/auto/qml/qqmllanguage/data/scriptString.2.errors.txt new file mode 100644 index 0000000000..f8a776f9a0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString.2.errors.txt @@ -0,0 +1 @@ +4:40:Cannot assign multiple values to a script property diff --git a/tests/auto/qml/qqmllanguage/data/scriptString.2.qml b/tests/auto/qml/qqmllanguage/data/scriptString.2.qml new file mode 100644 index 0000000000..dc825c7511 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString.2.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: [ MyTypeObject {}, MyTypeObject {} ] +} + diff --git a/tests/auto/qml/qqmllanguage/data/scriptString.qml b/tests/auto/qml/qqmllanguage/data/scriptString.qml new file mode 100644 index 0000000000..40a3bbeede --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: foo + bar + grouped.script: console.log(1921) +} diff --git a/tests/auto/qml/qqmllanguage/data/scriptString2.qml b/tests/auto/qml/qqmllanguage/data/scriptString2.qml new file mode 100644 index 0000000000..c42da2b9e1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString2.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: "hello\n\"world\"" +} diff --git a/tests/auto/qml/qqmllanguage/data/scriptString3.qml b/tests/auto/qml/qqmllanguage/data/scriptString3.qml new file mode 100644 index 0000000000..0cd82ff58f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString3.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: 12.345 +} diff --git a/tests/auto/qml/qqmllanguage/data/scriptString4.qml b/tests/auto/qml/qqmllanguage/data/scriptString4.qml new file mode 100644 index 0000000000..3e2f9a49f1 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptString4.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: true +} diff --git a/tests/auto/qml/qqmllanguage/data/signal.1.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.1.errors.txt new file mode 100644 index 0000000000..78d996016a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.1.errors.txt @@ -0,0 +1 @@ +4:12:Expected parameter type diff --git a/tests/auto/qml/qqmllanguage/data/signal.1.qml b/tests/auto/qml/qqmllanguage/data/signal.1.qml new file mode 100644 index 0000000000..1c27baa4e8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + signal mySignal(nontype a) +} diff --git a/tests/auto/qml/qqmllanguage/data/signal.2.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.2.errors.txt new file mode 100644 index 0000000000..0d4c33d750 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.2.errors.txt @@ -0,0 +1 @@ +4:21:Unexpected token `,' diff --git a/tests/auto/qml/qqmllanguage/data/signal.2.qml b/tests/auto/qml/qqmllanguage/data/signal.2.qml new file mode 100644 index 0000000000..2b00ab80bb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.2.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + signal mySignal(,) +} + diff --git a/tests/auto/qml/qqmllanguage/data/signal.3.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.3.errors.txt new file mode 100644 index 0000000000..bf043ac85a --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.3.errors.txt @@ -0,0 +1 @@ +4:22:Expected token `identifier' diff --git a/tests/auto/qml/qqmllanguage/data/signal.3.qml b/tests/auto/qml/qqmllanguage/data/signal.3.qml new file mode 100644 index 0000000000..1bfcfff7b5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.3.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + signal mySignal(a) +} + diff --git a/tests/auto/qml/qqmllanguage/data/signal.4.errors.txt b/tests/auto/qml/qqmllanguage/data/signal.4.errors.txt new file mode 100644 index 0000000000..513ff60ae6 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.4.errors.txt @@ -0,0 +1 @@ +4:12:Signal names cannot begin with an upper case letter diff --git a/tests/auto/qml/qqmllanguage/data/signal.4.qml b/tests/auto/qml/qqmllanguage/data/signal.4.qml new file mode 100644 index 0000000000..653c14e6aa --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/signal.4.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + signal MySignal +} + diff --git a/tests/auto/qml/qqmllanguage/data/simpleBindings.qml b/tests/auto/qml/qqmllanguage/data/simpleBindings.qml new file mode 100644 index 0000000000..2fcd1a5a4f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/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/qml/qqmllanguage/data/simpleContainer.qml b/tests/auto/qml/qqmllanguage/data/simpleContainer.qml new file mode 100644 index 0000000000..c3a795f536 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/simpleContainer.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyContainer { + MyQmlObject {} + MyQmlObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/simpleObject.qml b/tests/auto/qml/qqmllanguage/data/simpleObject.qml new file mode 100644 index 0000000000..30c78237de --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/simpleObject.qml @@ -0,0 +1,2 @@ +import Test 1.0 +MyQmlObject {} diff --git a/tests/auto/qml/qqmllanguage/data/singularProperty.2.errors.txt b/tests/auto/qml/qqmllanguage/data/singularProperty.2.errors.txt new file mode 100644 index 0000000000..beae562ff0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singularProperty.2.errors.txt @@ -0,0 +1 @@ +5:10:Cannot assign multiple values to a singular property diff --git a/tests/auto/qml/qqmllanguage/data/singularProperty.2.qml b/tests/auto/qml/qqmllanguage/data/singularProperty.2.qml new file mode 100644 index 0000000000..e2760cb418 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singularProperty.2.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +QtObject { + property QtObject a + a: [ QtObject {}, QtObject {} ] +} + diff --git a/tests/auto/qml/qqmllanguage/data/singularProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/singularProperty.errors.txt new file mode 100644 index 0000000000..beae562ff0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singularProperty.errors.txt @@ -0,0 +1 @@ +5:10:Cannot assign multiple values to a singular property diff --git a/tests/auto/qml/qqmllanguage/data/singularProperty.qml b/tests/auto/qml/qqmllanguage/data/singularProperty.qml new file mode 100644 index 0000000000..ccbc6f0849 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singularProperty.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + property variant a + a: [ QtObject {}, QtObject {} ] +} diff --git a/tests/auto/qml/qqmllanguage/data/subdir/Test.qml b/tests/auto/qml/qqmllanguage/data/subdir/Test.qml new file mode 100644 index 0000000000..f789a905f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/subdir/Test.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/subdir/subsubdir/SubTest.qml b/tests/auto/qml/qqmllanguage/data/subdir/subsubdir/SubTest.qml new file mode 100644 index 0000000000..f789a905f2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/subdir/subsubdir/SubTest.qml @@ -0,0 +1,2 @@ +import QtQuick 2.0 +Rectangle { } diff --git a/tests/auto/qml/qqmllanguage/data/test.js b/tests/auto/qml/qqmllanguage/data/test.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/test.js diff --git a/tests/auto/qml/qqmllanguage/data/test2.js b/tests/auto/qml/qqmllanguage/data/test2.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/test2.js diff --git a/tests/auto/qml/qqmllanguage/data/unregisteredObject.errors.txt b/tests/auto/qml/qqmllanguage/data/unregisteredObject.errors.txt new file mode 100644 index 0000000000..10e5fb2d96 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/unregisteredObject.errors.txt @@ -0,0 +1 @@ +2:1:UnregisteredObjectType is not a type diff --git a/tests/auto/qml/qqmllanguage/data/unregisteredObject.qml b/tests/auto/qml/qqmllanguage/data/unregisteredObject.qml new file mode 100644 index 0000000000..4969f62ad5 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/unregisteredObject.qml @@ -0,0 +1,2 @@ +import Test 1.0 +UnregisteredObjectType {} diff --git a/tests/auto/qml/qqmllanguage/data/unsupportedProperty.errors.txt b/tests/auto/qml/qqmllanguage/data/unsupportedProperty.errors.txt new file mode 100644 index 0000000000..3cd626de86 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/unsupportedProperty.errors.txt @@ -0,0 +1 @@ +3:13:Invalid property assignment: unsupported type "QMatrix" diff --git a/tests/auto/qml/qqmllanguage/data/unsupportedProperty.qml b/tests/auto/qml/qqmllanguage/data/unsupportedProperty.qml new file mode 100644 index 0000000000..9f19680368 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/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/qml/qqmllanguage/data/valueTypes.qml b/tests/auto/qml/qqmllanguage/data/valueTypes.qml new file mode 100644 index 0000000000..bf325a74ee --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/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/qml/qqmllanguage/data/variantNotify.qml b/tests/auto/qml/qqmllanguage/data/variantNotify.qml new file mode 100644 index 0000000000..169b245450 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/variantNotify.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 + +QtObject { + property int notifyCount: 0 + + property variant foo + onFooChanged: notifyCount++ + + Component.onCompleted: { + foo = 1; + foo = 1; + } +} diff --git a/tests/auto/qml/qqmllanguage/data/versionedbase.qml b/tests/auto/qml/qqmllanguage/data/versionedbase.qml new file mode 100644 index 0000000000..3e8bca0368 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/versionedbase.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 +import Test 1.1 + +MySubclass +{ + prop1: 10 + prop2: 10 +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.1.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.1.errors.txt new file mode 100644 index 0000000000..ba7a0766b2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.1.errors.txt @@ -0,0 +1 @@ +3:12:Invalid property assignment: int expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.1.qml b/tests/auto/qml/qqmllanguage/data/wrongType.1.qml new file mode 100644 index 0000000000..289d37f050 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.1.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value: "hello" +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.10.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.10.errors.txt new file mode 100644 index 0000000000..ae75b5289d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.10.errors.txt @@ -0,0 +1 @@ +3:23:Invalid property assignment: datetime expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.10.qml b/tests/auto/qml/qqmllanguage/data/wrongType.10.qml new file mode 100644 index 0000000000..2cf0e50277 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.10.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + dateTimeProperty: 12 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.11.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.11.errors.txt new file mode 100644 index 0000000000..23a4cda4c2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.11.errors.txt @@ -0,0 +1 @@ +3:20:Invalid property assignment: point expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.11.qml b/tests/auto/qml/qqmllanguage/data/wrongType.11.qml new file mode 100644 index 0000000000..ae77ba1fe8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.11.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + pointProperty: "apples" +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.12.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.12.errors.txt new file mode 100644 index 0000000000..3092100280 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.12.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: size expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.12.qml b/tests/auto/qml/qqmllanguage/data/wrongType.12.qml new file mode 100644 index 0000000000..b7a366f567 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.12.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + sizeProperty: "red" +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.13.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.13.errors.txt new file mode 100644 index 0000000000..ba7a0766b2 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.13.errors.txt @@ -0,0 +1 @@ +3:12:Invalid property assignment: int expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.13.qml b/tests/auto/qml/qqmllanguage/data/wrongType.13.qml new file mode 100644 index 0000000000..477aff1dbe --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.13.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + value: "12" +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.14.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.14.errors.txt new file mode 100644 index 0000000000..d621fdd6cd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.14.errors.txt @@ -0,0 +1 @@ +3:21:Invalid property assignment: string expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.14.qml b/tests/auto/qml/qqmllanguage/data/wrongType.14.qml new file mode 100644 index 0000000000..672d693c72 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.14.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + stringProperty: 10 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.15.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.15.errors.txt new file mode 100644 index 0000000000..44768e30cb --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.15.errors.txt @@ -0,0 +1 @@ +3:18:Invalid property assignment: url expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.15.qml b/tests/auto/qml/qqmllanguage/data/wrongType.15.qml new file mode 100644 index 0000000000..633a5ba2ba --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.15.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + urlProperty: 12 +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.16.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.16.errors.txt new file mode 100644 index 0000000000..77cf210918 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.16.errors.txt @@ -0,0 +1 @@ +4:24:Cannot assign object to property diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.16.qml b/tests/auto/qml/qqmllanguage/data/wrongType.16.qml new file mode 100644 index 0000000000..973fdada24 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.16.qml @@ -0,0 +1,5 @@ +import Test 1.0 +import QtQuick 2.0 +MyQmlObject { + qmlobjectProperty: QtObject {} +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.17.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.17.errors.txt new file mode 100644 index 0000000000..ef34d0ea95 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.17.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: unknown enumeration diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.17.qml b/tests/auto/qml/qqmllanguage/data/wrongType.17.qml new file mode 100644 index 0000000000..f678fb3136 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.17.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + enumProperty: 6 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.2.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.2.errors.txt new file mode 100644 index 0000000000..9ff9f250c0 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.2.errors.txt @@ -0,0 +1 @@ +3:14:Invalid property assignment: boolean expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.2.qml b/tests/auto/qml/qqmllanguage/data/wrongType.2.qml new file mode 100644 index 0000000000..34b74f7e01 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.2.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + enabled: 5 +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.3.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.3.errors.txt new file mode 100644 index 0000000000..6d971c6499 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.3.errors.txt @@ -0,0 +1 @@ +3:11:Invalid property assignment: rect expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.3.qml b/tests/auto/qml/qqmllanguage/data/wrongType.3.qml new file mode 100644 index 0000000000..384181a17f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.3.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyQmlObject { + rect: "5,5x10" +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.4.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.4.errors.txt new file mode 100644 index 0000000000..ef34d0ea95 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.4.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: unknown enumeration diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.4.qml b/tests/auto/qml/qqmllanguage/data/wrongType.4.qml new file mode 100644 index 0000000000..0787bf5fda --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.4.qml @@ -0,0 +1,4 @@ +import Test 1.0 +MyTypeObject { + enumProperty: "InvalidEnumName" +} diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.5.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.5.errors.txt new file mode 100644 index 0000000000..cab10bddb8 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.5.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: unsigned int expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.5.qml b/tests/auto/qml/qqmllanguage/data/wrongType.5.qml new file mode 100644 index 0000000000..c50ae9a26d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.5.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + uintProperty: -13 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.6.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.6.errors.txt new file mode 100644 index 0000000000..d2b8c54c5b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.6.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: number expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.6.qml b/tests/auto/qml/qqmllanguage/data/wrongType.6.qml new file mode 100644 index 0000000000..da10b7895f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.6.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + realProperty: "Hello" +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.7.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.7.errors.txt new file mode 100644 index 0000000000..614346bd2b --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.7.errors.txt @@ -0,0 +1 @@ +3:20:Invalid property assignment: color expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.7.qml b/tests/auto/qml/qqmllanguage/data/wrongType.7.qml new file mode 100644 index 0000000000..ddc3835199 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.7.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + colorProperty: 12 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.8.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.8.errors.txt new file mode 100644 index 0000000000..1773c00825 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.8.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: date expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.8.qml b/tests/auto/qml/qqmllanguage/data/wrongType.8.qml new file mode 100644 index 0000000000..a5f6756399 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.8.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + dateProperty: 12 +} + diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.9.errors.txt b/tests/auto/qml/qqmllanguage/data/wrongType.9.errors.txt new file mode 100644 index 0000000000..8630975c57 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.9.errors.txt @@ -0,0 +1 @@ +3:19:Invalid property assignment: time expected diff --git a/tests/auto/qml/qqmllanguage/data/wrongType.9.qml b/tests/auto/qml/qqmllanguage/data/wrongType.9.qml new file mode 100644 index 0000000000..a3db732692 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/wrongType.9.qml @@ -0,0 +1,5 @@ +import Test 1.0 +MyTypeObject { + timeProperty: 12 +} + |