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

QML compile time optimizations for global object

    XMLWordPrintable

Details

    Description

      It should be possible to resolve many global symbols at QML compile time, since QML takes pains to e.g. disallow shadowing global properties.

      For example, lookup of Math in:

      Item {
          height: Math.max(valueA, valueB)
      }
      

      or qsTr in:

      Text {
          text: qsTr("Hello World") + LanguageUpdater.update
      }
      

      should be resolvable at component compilation.

      Prior to V4 the optimizer handled a limited subset of these cases.

      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
              mbrasser Michael Brasser
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes