Files
qt-creator/tests
Sami Shalayel 6ecfb9da36 qmlls: use import paths also used in old codemodel
Add the import paths used by the old codemodel to qmlls via "-I"
commandline parameter. This includes import paths passed from the
QML_IMPORT_PATH CMake variable.

The downside of passing the import paths as commandline parameters to
qmlls is that all QML module end up using the same import path. In
general, this is not the case, QML Modules with "DEPENDENCIES TARGET" or
"IMPORT_PATH" in their qt_add_qml_module()-call might have extra import
paths that other modules don't have.

An example for this is a QML Module linking to another static QML
module. It builds fine but qmlls can't find the static QML module
if its outside the Qml import path.

This scenario works fine when using QT_QML_GENERATE_QMLLS_INI.

Add a manual test project with such a QML_IMPORT_PATH CMake variable,
where qmlls should not warn about importing MyModule in Main.qml.

Task-number: QTCREATORBUG-31897
Change-Id: Ic4c048dfdacfc2de11db8973dcbdca83989af320
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-01-02 09:35:00 +00:00
..
2024-04-18 09:52:28 +00:00