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

qml: do not fail parsing on cmake comments or missing '}' brace

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 6.8
    • QML: Tooling
    • None

    Description

      From the original report:

      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:

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

      " is added

      } // Button

      The new error-tolerant QML parser should support this case (and probably just ignore the line starting with '#').

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              sami.shalayel Sami Shalayel
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes