Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7
-
None
-
720bfe108 (dev), dabae9cf7 (dev), 8852cdee4 (6.7), 0441f3661 (6.7)
Description
Completions on qualified identifiers is returning invalid properties, for example in
Item { property int bad Component.<bad is suggested here> : {} }
This is mainly because of the confusion of https://codereview.qt-project.org/c/qt/qtdeclarative/+/516104 : you need to have "currentParent" for the context and "currentItem" for the actual Item to be completed. "currentParent" is not sufficient to get the correct completion working.
On one hand, currentParent can be used to find out, for example, if you are in the left side or right side of the ':' in the binding, as both sides get different completions.
On the other hand, currentItem is required to complete qualified expressions. In the example above, without currentItem, the completion does not know that it needs to generate suggestions for stuff inside of the Completion attached property.
Therefore, amend https://codereview.qt-project.org/c/qt/qtdeclarative/+/516104 to pass the item and the parent to the completion helpers to be able to provide correct completions.
Attachments
Issue Links
- is required for
-
QTBUG-113727 qmlls: improve Code completion using new QQmlLSUtils stuff
- Closed
- resulted in
-
QTBUG-120169 qmlls: no completion in attached/grouped properties because of parser
- Closed
- split from
-
QTBUG-117442 qmlls: completion for attached + grouped properties
- Closed