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 <fabian.kosmale@qt.io>
This commit is contained in:
Sami Shalayel 2025-07-31 13:29:55 +02:00
parent 799926a771
commit 5e698fbf62
2 changed files with 3 additions and 7 deletions

View File

@ -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
}

View File

@ -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;