aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-03 15:13:46 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-09 16:52:55 +0200
commit910f98031fdd834a22af0da21c9ff6ae145f61c5 (patch)
tree03062e2ec8ccca2a1bbdc2c6e69587de1eedbe76 /tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml
parentf2cb10ebc4946b10526fa22581913ccc04cea164 (diff)
Add support for C++ accessible typed parameters and return types in qml functions
These can be declared using the new typescript-like syntax and using type names that are also used for signal parameters and property types. This merely affects their signature on the C++ side and allows the corresponding invocation. Change-Id: Icaed4ee0dc7aa71330f99d96e073a2a63d409bbe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml')
-rw-r--r--tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml b/tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml
new file mode 100644
index 0000000000..26931a4f10
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/functionParameterTypes.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0 as QQ
+import QtQml 2.0 as Core
+QQ.Item {
+ id: root
+ function returnItem() : Core.QtObject { return root; }
+ function takeString(arg: string) { return arg; }
+}