diff options
| author | Sami Shalayel <sami.shalayel@qt.io> | 2025-03-18 18:03:38 +0100 |
|---|---|---|
| committer | Sami Shalayel <sami.shalayel@qt.io> | 2025-04-23 07:36:34 +0100 |
| commit | 72dc34f213d58f4fab6a699f5d5244c233e89878 (patch) | |
| tree | 3fa0be0cf1557c7f0b5fe1299cec88a6cc2cb78a /src/quicktestutils/quick/visualtestutils.cpp | |
| parent | e28947f150b47fbe3930dbbca38b482c37aa28a4 (diff) | |
qmlls: make QQmlJSImportVisitor process updates to files
Qmlls makes QQmlJSImportVisitor re-create a QQmlJSScope when a file gets
updated. It turns out that QQmlJSImportVisitor only works correctly when
used on an empty scopes, methods like rootScopeIsValid() don't work
correctly if the scope is not empty.
Therefore, reset the scopes before making QQmlJSImportVisitor run on
them. Make sure that the internalName and the moduleName are still set.
This fixes a bug where qmlls can't autocomplete an "in-memory" enum
because the import visitor does not set the new enum values in the root
element correctly on an non-empty scope.
Pick-to: 6.8 6.9
Fixes: QTCREATORBUG-32634
Change-Id: If6d620f350215074f87b53bb153363f2dec06145
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quicktestutils/quick/visualtestutils.cpp')
0 files changed, 0 insertions, 0 deletions
