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

Establish a language versioning mechanism for QML

    XMLWordPrintable

Details

    Description

      In order to manage differing behavior between QML version 2 and version 3 we need a way to declare which version of the language a particular file should use. The following options should be provided:

      1. A "pragma version {2|3}" in the header of the QML file. This has the highest priority
      2. The file ending. "qml" weakly hints to version 2, "qml3" forces version 3. A file ending in "qml3" with "pragma version 2" in the header should be a compile error.
      3. Failing to detect any of the above, Qt5 will assume version 2 and Qt6 will assume version 3. This should produce a warning, already in Qt5.

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              ulherman Ulf Hermann
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes