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

Import modules versioning

    XMLWordPrintable

Details

    • dd49b322b327fe87d8420abcce0e6cee877a88d7

    Description

      QML supports versioned types in modules. There's a version major and a version minor.

      This makes it possible to have a module com.organisation.fancycomponents with version 1.0, and later you could ship a new module com.organisation.fancycomponents which contains a more recent version 1.1 or 2.0 AND also the old versions to keep old code running.

      This is good.

      The problem is that this is difficult with certain QA procedures. It's hard to verify that a new module is indeed 100% compatible with the previous versions.

      The suggestion (implemented in the attached patch) is to extend the import mechanism by adding optional versioning to the component patch.

      With the patch, you can add a new module com.organisation.fancycomponents.2.0 which will be loaded when the QML file specifies "import com.organisation.fancycomponents 2.0".

      The patch works as follows: if you try to load com.organisation.fancycomponents in version 2.0, the engine first looks for com/organisation/fancycomponents.2.0, then for com/organisation/fancycomponents.2 then for com.organisation/fancycomponents.

      This has been requested by Thomas Strehl.

      Attachments

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

        Activity

          People

            mae mae
            mae mae
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes