diff options
Diffstat (limited to 'tests/auto/qmlls/modules/data/completions')
6 files changed, 85 insertions, 0 deletions
diff --git a/tests/auto/qmlls/modules/data/completions/SomeBase.qml b/tests/auto/qmlls/modules/data/completions/SomeBase.qml new file mode 100644 index 0000000000..9c36e13c5b --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/SomeBase.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + +} diff --git a/tests/auto/qmlls/modules/data/completions/Yyy.qml b/tests/auto/qmlls/modules/data/completions/Yyy.qml new file mode 100644 index 0000000000..9ac6f9968d --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/Yyy.qml @@ -0,0 +1,32 @@ +import QtQuick 2.0 +import QtQuick as QQ + +Zzz { + id: root + width: height + Rectangle { + color: "green" + anchors.fill: parent + width: root.height + height: root.foo.height + + } + + function lala() {} + property Rectangle foo: Rectangle{ height: 200 } + function longfunction(a, b, c = "c", d = "d"): string { + return "hehe: " + c + d + } + + // documentedFunction: is documented + // returns 'Good' + function documentedFunction(arg1, arg2 = "Qt"): string { + return "Good" + } + QQ.Rectangle { + color:"red" + } + + component IC: Zzz { property SomeBase data } + property SomeBase mySomeBase +} diff --git a/tests/auto/qmlls/modules/data/completions/Zzz.qml b/tests/auto/qmlls/modules/data/completions/Zzz.qml new file mode 100644 index 0000000000..165ea46394 --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/Zzz.qml @@ -0,0 +1,10 @@ +import QtQuick 2.11 + +Item { + id: zzz + height: 333 + + Rectangle { + width: zzz.height + } +} diff --git a/tests/auto/qmlls/modules/data/completions/bindingAfterDot.qml b/tests/auto/qmlls/modules/data/completions/bindingAfterDot.qml new file mode 100644 index 0000000000..2a8694342b --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/bindingAfterDot.qml @@ -0,0 +1,14 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick + +QtObject { + id: root + property int good + property var i: Item { + property int bad + property int myP: root. + Item { } + } +} diff --git a/tests/auto/qmlls/modules/data/completions/defaultBindingAfterDot.qml b/tests/auto/qmlls/modules/data/completions/defaultBindingAfterDot.qml new file mode 100644 index 0000000000..4cf47b6f31 --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/defaultBindingAfterDot.qml @@ -0,0 +1,14 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick + +QtObject { + id: root + property int good + property var i: Item { + property int bad + property int myP2: root. + bad: 43 + } +} diff --git a/tests/auto/qmlls/modules/data/completions/fromBuildDir.qml b/tests/auto/qmlls/modules/data/completions/fromBuildDir.qml new file mode 100644 index 0000000000..2c35f5b864 --- /dev/null +++ b/tests/auto/qmlls/modules/data/completions/fromBuildDir.qml @@ -0,0 +1,10 @@ +import BuildDir +import QtQuick +BuildDirType { + Rectangle { + color: "green" + width: 250 + height: 10 + } + Button {} +} |