diff options
Diffstat (limited to 'tests/auto/qml/qmltc/QmltcTests')
5 files changed, 54 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltc/QmltcTests/CMakeLists.txt b/tests/auto/qml/qmltc/QmltcTests/CMakeLists.txt index fbb5de6815..cf3cd41fa4 100644 --- a/tests/auto/qml/qmltc/QmltcTests/CMakeLists.txt +++ b/tests/auto/qml/qmltc/QmltcTests/CMakeLists.txt @@ -91,6 +91,7 @@ set(qml_sources deferredProperties_attached.qml deferredProperties_complex.qml repeaterCrash.qml + aliases.qml # support types: DefaultPropertySingleChild.qml @@ -99,6 +100,9 @@ set(qml_sources LocalWithOnCompleted.qml LocallyImported_context.qml # SingletonThing.qml + ComponentWithAlias1.qml + ComponentWithAlias2.qml + ComponentWithAlias3.qml badFile.qml ) diff --git a/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml new file mode 100644 index 0000000000..210cf1e159 --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml @@ -0,0 +1,8 @@ +import QtQuick + +Item { + property alias setMe: firstComponent.setMe + ComponentWithAlias2 { + id: firstComponent + } +} diff --git a/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias2.qml b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias2.qml new file mode 100644 index 0000000000..818f3a464e --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias2.qml @@ -0,0 +1,8 @@ +import QtQuick + +Item { + property alias setMe: firstComponent.setMe + ComponentWithAlias3 { + id: firstComponent + } +} diff --git a/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias3.qml b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias3.qml new file mode 100644 index 0000000000..87b917ad19 --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias3.qml @@ -0,0 +1,5 @@ +import QtQuick + +Item { + property string setMe: "Set me!" +} diff --git a/tests/auto/qml/qmltc/QmltcTests/aliases.qml b/tests/auto/qml/qmltc/QmltcTests/aliases.qml new file mode 100644 index 0000000000..9f13f7b17a --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/aliases.qml @@ -0,0 +1,29 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick + +Item { + property alias aliasToAlias: subItem.aliasToAlias + Item { + id: subItem + property alias aliasToAlias: subsubItem.aliasToAlias + + Item { + id: subsubItem + property alias aliasToAlias: subsubsubItem.value + + Item { + id: subsubsubItem + property string value: "Hello World!" + } + } + } + + property alias aliasToOtherFile: inOtherFile.setMe + + ComponentWithAlias1 { + id: inOtherFile + } +} + |