From 5e698fbf62d693d9dd7e6b51bf739d65973b4958 Mon Sep 17 00:00:00 2001 From: Sami Shalayel Date: Thu, 31 Jul 2025 13:29:55 +0200 Subject: [PATCH] tst_qmlls_utils: remove invalid test for attached derived type We want to warn about using attached derived types in QTBUG-138873, so remove the test that was testing whether go to definition jumps to the derived type MyApplicationWindow when querying for the MyApplicationWindow.footer attached property of the ApplicationWindow base type. A later commit will make qmlls jump to the C++ definition of the attached type, instead of the QML type. Task-number: QTBUG-128393 Change-Id: Ieb96e94315fe8f053302aee3f44cd2437c81fbe0 Reviewed-by: Fabian Kosmale --- .../qmlls/utils/data/findDefinition/QmlComponents.qml | 2 +- tests/auto/qmlls/utils/tst_qmlls_utils.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/auto/qmlls/utils/data/findDefinition/QmlComponents.qml b/tests/auto/qmlls/utils/data/findDefinition/QmlComponents.qml index 130f143432..41f23de246 100644 --- a/tests/auto/qmlls/utils/data/findDefinition/QmlComponents.qml +++ b/tests/auto/qmlls/utils/data/findDefinition/QmlComponents.qml @@ -6,7 +6,7 @@ import findDefinition.MyApplicationWindowModule MyApplicationWindow { Item { - property var attachedProperty: MyApplicationWindow.footer + property var justAnEnum: MyApplicationWindow.Kitty property var justAnEnum2: MyApplicationWindow.Hello.Kitty } diff --git a/tests/auto/qmlls/utils/tst_qmlls_utils.cpp b/tests/auto/qmlls/utils/tst_qmlls_utils.cpp index 3b0c91375f..299dd687ef 100644 --- a/tests/auto/qmlls/utils/tst_qmlls_utils.cpp +++ b/tests/auto/qmlls/utils/tst_qmlls_utils.cpp @@ -1926,17 +1926,13 @@ void tst_qmlls_utils::findDefinitionFromLocation_data() const QString qualifiedQmlComponents = testFile(u"findDefinition/QualifiedQmlComponents.qml"_s); QTest::addRow("component") << qmlComponents << 7 << 11 << definitionFile << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir; - QTest::addRow("attachedType") << qmlComponents << 9 << 42 << definitionFile << 7 << 1 - << strlen("ApplicationWindow") << noExtraBuildDir; QTest::addRow("enumValue") << qmlComponents << 10 << 42 << definitionFile << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir; QTest::addRow("enumName") << qmlComponents << 11 << 42 << definitionFile << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir; - QTest::addRow("qualifiedComponent") << qualifiedQmlComponents << 7 << 11 << definitionFile - << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir; - QTest::addRow("qualifiedAttachedType") - << qualifiedQmlComponents << 9 << 47 << definitionFile << 7 << 1 + QTest::addRow("qualifiedComponent") + << qualifiedQmlComponents << 7 << 11 << definitionFile << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir; QTest::addRow("qualifiedEnumValue") << qualifiedQmlComponents << 10 << 42 << definitionFile << 7 << 1 << strlen("ApplicationWindow") << noExtraBuildDir;