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

QmlDom: test for unsupported JS constructs

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P1: Critical
    • 6.8
    • 6.6
    • QML: Tooling
    • None
    • f95f070e5 (dev), 68797cb01 (dev), 2a2eee5f0 (dev), 44a78d01b (dev), c75a4ab1f (6.6), 4b1109bcb (6.6), 526e3556a (6.6), d5c411f11 (6.6)

    Description

      Add support for currently unsupported JS-stuff in the Dom or avoid crashing when encountering them. Also write tests for it.

      See also following files that asserts in qqmldomastcreator:

      excludedFiles << u"tests/auto/qml/qmlformat/data/ecmaScriptClassInQml.qml"_s; // we dont need ecmascriptclass support, so avoid crashing on this file
      excludedFiles << u"tests/auto/qml/qmlformat/data/Example1.qml"_s; // this should be supported in the Dom!
      excludedFiles << u"tests/auto/qml/qmlformat/data/nestedFunctions.qml"_s; // this should be supported too!

       

      See https://codereview.qt-project.org/c/qt/qtdeclarative/+/491538 on an example on how to avoid the crashes for the unsupported constructs.

      Attachments

        1. crash.qml
          0.3 kB
          Sami Shalayel
        2. crash2.qml
          0.1 kB
          Sami Shalayel
        3. crash3.qml
          0.1 kB
          Sami Shalayel

        Issue Links

          For Gerrit Dashboard: QTBUG-116392
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: