diff options
Diffstat (limited to 'tests/auto/qml/qqmlparser/data/typeannotations')
8 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_bool.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_bool.qml new file mode 100644 index 0000000000..79a9ede3d4 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_bool.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test() : bool { return true; } +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_double.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_double.qml new file mode 100644 index 0000000000..f58e4b92d9 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_double.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test() : double { return 0; } +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_int.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_int.qml new file mode 100644 index 0000000000..267ad7191f --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_int.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test() : int { return 0; } +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_real.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_real.qml new file mode 100644 index 0000000000..9973819ad2 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_real.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test() : real { return 0; } +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_string.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_string.qml new file mode 100644 index 0000000000..e632ec7154 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_string.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test(s: string) {} +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_url.qml b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_url.qml new file mode 100644 index 0000000000..ebf3f32561 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/basic_qmltypes_url.qml @@ -0,0 +1,4 @@ +import QtQml 2.0 +QtObject { + function test(u: url) {} +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/parametrized.qml b/tests/auto/qml/qqmlparser/data/typeannotations/parametrized.qml new file mode 100644 index 0000000000..d80b5e3f87 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/parametrized.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 as MyQuick +MyQuick.Item { + function factory() : list<MyQuick.Item> { + } +} diff --git a/tests/auto/qml/qqmlparser/data/typeannotations/qmlfunction.qml b/tests/auto/qml/qqmlparser/data/typeannotations/qmlfunction.qml new file mode 100644 index 0000000000..cd5c1f51e5 --- /dev/null +++ b/tests/auto/qml/qqmlparser/data/typeannotations/qmlfunction.qml @@ -0,0 +1,6 @@ +import QtQuick 2.12 as MyQuick +MyQuick.Item { + function factory(param: string) : MyQuick.Item { + return this + } +} |