Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120102

qmlls: completion mismatch for qualified expressions

    XMLWordPrintable

Details

    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sami.shalayel Sami Shalayel
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes