Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-31125

Various issues with QML LSP

    XMLWordPrintable

Details

    • 0cfdf2f5a (14.0)

    Description

      This is a collection of various observed issues with QML LSP. Issues have all been observed with QML LS in the current Qt6.8 beta1.

       

      Adding a property string foo to a component is not available to the QML LS until a) after the modified file has been saved and b) after the code has been built and c) after the enclosing QML file is subsequently edited. That's three steps necessary to let the code model know about a single string property addition.

       

       

      Sometimes can't COMMAND+Click Qt Quick Controls to open their style-specific implementation QML files from the Qt install folder. Seen notably with ApplicationWindow at the root of a document.
      It has been found that COMMAND+double-clicking can sometimes (but not always) open ApplicationWindow. However when it does work, it opens the wrong one - e.g. opening with Kit=6.7.2 opens the one from Qt 6.8 instead which is incorrect.
      If the "Use qmlls from latest Qt" is unchecked, the double-click doesn't work at all.

       

       

      import QtQuick.Controls [dot] does not then show the available modules. The old QML Code model does this. It simply offers "as" assuming to then write a namespace.

       

       

      Coloring of the syntax highlighter can change color mid-keyword so you can have for example a Rectangle partly rendered in blue and partly in green. This happens as you type and the syntax highlighter just can't keep up; for example, when fixing missing closing braces or adding missing commas on json array items where multiple lines require re-parsing for syntax highlighting at the same time due to knock-on effects of semantic changes/fixes.
      See "Poor Color Breaks" for an example.

       

       

      Duplicate inline component declaration is not detected and causes incorrect knock-on error
      See "Bacon Cake" for an example.

       

       

       If there are warnings and error displayed in a QML file and you add a "CMake-style" # (hash) comment by "accident" at the end of the file instead of using // or /* then the entire file's warnings and errors are removed

       

       

      Code completion within as-yet unclosed JavaScript blocks doesn't work at all. e.g.:

      Button {
      onClicked:

      { someObject.property = 10 // you will get no code completion within this block until the closing "}

      " is added

      } // Button

       

      See QML Code Model Highlighting Issues.mov for an example of the highlighting issue

       

       

       

      QML LS doesn't know about anchors, see the project ZoomAndPan and screenshot.

      Attempting to restart the QML LSP for that project results in a crash, see the crash log

      Attachments

        1. Bacon Cake.png
          Bacon Cake.png
          172 kB
        2. CrashLog.txt
          338 kB
        3. Gloriously Colorful.png
          Gloriously Colorful.png
          348 kB
        4. Poor Color Breaks.png
          Poor Color Breaks.png
          102 kB
        5. QML Code Model Highlighting Issues.mov
          18.59 MB
        6. QML LS Options - QTC14b2.png
          QML LS Options - QTC14b2.png
          51 kB
        7. Restart QMLLS Menu Problem.mov
          22.54 MB
        8. Screenshot 2024-06-23 at 1.22.04 PM.png
          Screenshot 2024-06-23 at 1.22.04 PM.png
          1.38 MB
        9. ZoomAndPan.zip
          8 kB

        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
              kevin.zhang Kevin Zhang
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes