Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.5.0, 6.8.0 RC
-
Windows 10 22H2
Ubuntu 24.04
Description
Issues
- When a new project is generated with qmlls enabled, the editor is filled with false warnings. The amount of warning text is greater than the amount of actual code, which looks quite bad.
"Tools" > "QML/JS" > "Reset Code Model" does not work. Clicking this should cause a full rescan of the code.
Notes
I had checked "Edit" > "Preferences..." > "Qt Quick" > "QML/JS Editing" > "Always use latest qmlls"
I have many different kits installed, including the Qt 6.6.0 snapshot. However, when I hover my mouse over the Language Server icon on the Editor toolbar (https://doc.qt.io/qtcreator/creator-coding-navigating.html#managing-language-servers ), I see that Qt Creator had selected C:\Qt\6.5.1\Boot2Qt\raspberrypi4-64\toolchain\sysroots\x86_64-w64-mingw32\usr\bin\qmlls.exe instead of C:\Qt\6.6.0\msvc2019_64\bin\qmlls.exe
Partial Workaround
When I uncheck "Always use latest qmlls" and create a new project using my Desktop MSVC kit, Qt Creator uses C:\Qt\6.5.1\msvc2019_64\bin\qmlls.exe and the issue doesn't occur.
Further observations
- It looks like C:\Qt\6.5.1\Boot2Qt\raspberrypi4-64\toolchain\sysroots\x86_64-w64-mingw32\usr\bin\qmlls.exe is problematic. The workaround above works for my Desktop kit, but the issue comes back when I create a new project for my Boot2Qt kit.
- When I restart the language server (https://doc.qt.io/qtcreator/creator-language-servers.html#inspecting-language-clients ), nothing seems to happen for ~15s... and then the warnings disappear (in contrast to "Reset QML/JS Model" which clears all warnings from the built-in code model instantly).
- It seems like the "Restart Qmlls" menu item actually shuts down qmlls without restarting it, and the current document does not get re-scanned. We need to open another QML file to actually get it restarted (See the "Inspect Language Clients" log)
Attachments
Issue Links
- depends on
-
QTBUG-120632 qmlls does not work for older Qt Versions (e.g. Qt 5.15)
- Reported
-
QTBUG-131365 cmake: add default qml import paths to .qmlls.ini
- Reported
-
QTBUG-131245 Make QMakeLibraryInfo a private library
- In Progress
-
QTBUG-131363 qmlls: add a --bare option
- In Progress
- is duplicated by
-
QTCREATORBUG-31968 Qt Creator does not notice correct Toradex imports
- Closed
-
QTCREATORBUG-31534 Import path warnings in QML files
- Closed