Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 11.0.3, Qt Creator 12.0.0-beta2
-
Windows 10 22H2
Description
Steps to reproduce
- Download the attached archive
- Load ProjectA first
- Load ProjectB second
- Open ProjectA/main.qml
- In the code editor, hover your mouse cursor over the import statement, "import content" to reveal the full path to the imported module
- In the code editor, inspect the property of the App object
- Repeat Steps #4 - #6 with ProjectB/main.qml
Expected outcomes
- Step #5: The path should correspond to the current project's build folder.
- Step #6: There should be no errors/warnings on the property. Hovering your mouse cursor over the property should reveal its correct datatype.
Actual outcomes
(For one of the projects, probably ProjectB):
- Step #5: The path corresponds to the other project's build folder.
- Step #6: We see the error, "Invalid property name" (M16)
Cause
QML_IMPORT_PATH seems to be a global setting, rather than a per-project setting. You can verify this by adding an invalid import statement: The tooltip will show that both projects are in the import path.
Notes
These projects are near-vanilla copies of the Qt Design Studio CMake template. The only changes are:
- A single property alias is added to each project's App type and accessed in the corresponding main.qml (a different property for each project)
- QT_QML_OUTPUT_DIRECTORY and QML_IMPORT_PATH are set to work around
QDS-11149
Attachments
Issue Links
- resulted in
-
QTCREATORBUG-31420 qmlls: disabled warnings from embedded codemodel shown in tooltips
- Reported