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

qmlls: reuse the Dom instance for linting, instead of recreating it

XMLWordPrintable

    • 675aea369 (dev)

      Currently, qmlls constructs the Dom twice for each document. This is because qqmlintsuggestions.cpp (the qmlls module that takes care of linting and showing errors and warnings) uses QQmlJSLinter::lintFile() to perform the lint:

      Currently, QQmlJSLinter::lintFile() does create a new Dom instance to perform its linting, but it should reuse the Dom created by QQmlCodeModel::newDocForOpenFile(). Same for all dependencies required for the Dom construction: QQmlJSResourceFileMapper, QQmlJSImporter, the QQmlDomAstCreator and QQmlJSImportVisitor inside of QQmlDomAstCreatorWithQQmlJSScope, etc.... See also createDom() in qqmldomastcreator.cpp and compare it to QQmlJSLinter::lintFile().

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

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

              Created:
              Updated:

                There are no open Gerrit changes