aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmllint/data')
-rw-r--r--tests/auto/qml/qmllint/data/AttachedProps.qml6
-rw-r--r--tests/auto/qml/qmllint/data/AutomatchedSignalHandler.qml (renamed from tests/auto/qml/qmllint/data/UnmatchedSignalHandler.qml)0
-rw-r--r--tests/auto/qml/qmllint/data/Methods.js3
-rw-r--r--tests/auto/qml/qmllint/data/badAlias.qml5
-rw-r--r--tests/auto/qml/qmllint/data/badAliasProperty.qml6
-rw-r--r--tests/auto/qml/qmllint/data/badParent.qml7
-rw-r--r--tests/auto/qml/qmllint/data/badTypeAssertion.qml6
-rw-r--r--tests/auto/qml/qmllint/data/goodAlias.qml12
-rw-r--r--tests/auto/qml/qmllint/data/goodParent.qml8
-rw-r--r--tests/auto/qml/qmllint/data/goodTypeAssertion.qml6
-rw-r--r--tests/auto/qml/qmllint/data/javascriptMethods.qml6
-rw-r--r--tests/auto/qml/qmllint/data/memberNotFound.qml7
-rw-r--r--tests/auto/qml/qmllint/data/parentIsComponent.qml13
-rw-r--r--tests/auto/qml/qmllint/data/unknownElement.qml (renamed from tests/auto/qml/qmllint/data/spuriousParentWarning.qml)0
-rw-r--r--tests/auto/qml/qmllint/data/unknownJavascriptMethod.qml6
15 files changed, 91 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/AttachedProps.qml b/tests/auto/qml/qmllint/data/AttachedProps.qml
new file mode 100644
index 0000000000..01be66f866
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/AttachedProps.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+
+QtObject {
+ id: self
+ property var foo: self.Component.completed
+}
diff --git a/tests/auto/qml/qmllint/data/UnmatchedSignalHandler.qml b/tests/auto/qml/qmllint/data/AutomatchedSignalHandler.qml
index 064444e182..064444e182 100644
--- a/tests/auto/qml/qmllint/data/UnmatchedSignalHandler.qml
+++ b/tests/auto/qml/qmllint/data/AutomatchedSignalHandler.qml
diff --git a/tests/auto/qml/qmllint/data/Methods.js b/tests/auto/qml/qmllint/data/Methods.js
new file mode 100644
index 0000000000..52ab857e38
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Methods.js
@@ -0,0 +1,3 @@
+function foo() {
+ return "ttt"
+}
diff --git a/tests/auto/qml/qmllint/data/badAlias.qml b/tests/auto/qml/qmllint/data/badAlias.qml
new file mode 100644
index 0000000000..2dd7d1a7e0
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badAlias.qml
@@ -0,0 +1,5 @@
+import QtQml 2.0
+
+QtObject {
+ property alias wrong: nowhere
+}
diff --git a/tests/auto/qml/qmllint/data/badAliasProperty.qml b/tests/auto/qml/qmllint/data/badAliasProperty.qml
new file mode 100644
index 0000000000..9483c52cd0
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badAliasProperty.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+
+QtObject {
+ id: self
+ property alias wrong: self.nowhere
+}
diff --git a/tests/auto/qml/qmllint/data/badParent.qml b/tests/auto/qml/qmllint/data/badParent.qml
new file mode 100644
index 0000000000..f381f059cc
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badParent.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+
+Item {
+ Item {
+ property int yyy: parent.rrr
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/badTypeAssertion.qml b/tests/auto/qml/qmllint/data/badTypeAssertion.qml
new file mode 100644
index 0000000000..717fc1b1bb
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badTypeAssertion.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+
+Item {
+ property QtObject foo: Item { x: 4 }
+ property real foox: (foo as Item).rrr
+}
diff --git a/tests/auto/qml/qmllint/data/goodAlias.qml b/tests/auto/qml/qmllint/data/goodAlias.qml
new file mode 100644
index 0000000000..d2fa4485ec
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/goodAlias.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.0
+
+Item {
+ id: self
+
+ QtObject {
+ id: inner
+ }
+
+ property alias innerObj: inner
+ property alias name: self.objectName
+}
diff --git a/tests/auto/qml/qmllint/data/goodParent.qml b/tests/auto/qml/qmllint/data/goodParent.qml
new file mode 100644
index 0000000000..413337713a
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/goodParent.qml
@@ -0,0 +1,8 @@
+import QtQuick 2.0
+
+Item {
+ property int rrr: 5
+ Item {
+ property int yyy: parent.rrr
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/goodTypeAssertion.qml b/tests/auto/qml/qmllint/data/goodTypeAssertion.qml
new file mode 100644
index 0000000000..6f5f52eb6b
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/goodTypeAssertion.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+
+Item {
+ property QtObject foo: Item { x: 4 }
+ property real foox: (foo as Item).x
+}
diff --git a/tests/auto/qml/qmllint/data/javascriptMethods.qml b/tests/auto/qml/qmllint/data/javascriptMethods.qml
new file mode 100644
index 0000000000..62ddcfda60
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/javascriptMethods.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+import "Methods.js" as Methods
+
+QtObject {
+ objectName: Methods.foo()
+}
diff --git a/tests/auto/qml/qmllint/data/memberNotFound.qml b/tests/auto/qml/qmllint/data/memberNotFound.qml
new file mode 100644
index 0000000000..da2e353227
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/memberNotFound.qml
@@ -0,0 +1,7 @@
+import QtQml 2.0
+
+QtObject {
+ id: self
+ property string n: self.objectName
+ property string not: self.foo
+}
diff --git a/tests/auto/qml/qmllint/data/parentIsComponent.qml b/tests/auto/qml/qmllint/data/parentIsComponent.qml
new file mode 100644
index 0000000000..a74bf9e4e8
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/parentIsComponent.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+Item {
+ Component {
+ id: foo
+ Item {
+ property real yyy: parent.progress
+ Component.onCompleted: console.log(yyy)
+ }
+ }
+
+ property var stuff: foo.createObject()
+}
diff --git a/tests/auto/qml/qmllint/data/spuriousParentWarning.qml b/tests/auto/qml/qmllint/data/unknownElement.qml
index 1323593031..1323593031 100644
--- a/tests/auto/qml/qmllint/data/spuriousParentWarning.qml
+++ b/tests/auto/qml/qmllint/data/unknownElement.qml
diff --git a/tests/auto/qml/qmllint/data/unknownJavascriptMethod.qml b/tests/auto/qml/qmllint/data/unknownJavascriptMethod.qml
new file mode 100644
index 0000000000..2718e07c60
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/unknownJavascriptMethod.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+import "Methods.js" as Methods
+
+QtObject {
+ objectName: Methods.foo2()
+}