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

URI and VERSION should be optional in qt_add_qml_module

    XMLWordPrintable

Details

    • 2d44365f6 (dev), 1d090673b (6.5)

    Description

      Users should not care about versions. Internally the version should default to 254.254, that is the highest valid version that can be encoded in QTypeRevision. This makes all revisions of all types available.

      The URI is a more complicated issue. We've seen that people frequently struggle with naming their "entry point" module. You cannot give the module the same name as the executable because that will cause name clashes in the file system. Most of the time, however, that "entry point" module is never imported from anywhere. As such, it doesn't really need a name.

      As a solution, a missing URI option should create a special module of the same name as the target it's attached to. It would:

      1. live in the same output directory as the target, avoiding the name clash
      2. be bundled directly in the RESOURCE_PREFIX, without appending the target path
      3. never create a plugin
      4. never be deployed into the import path. Only the resource version of the module would be available at run time.

      As such a module could not be imported, it could also not be used in an SDK. Therefore, no sources and no qmltypes files, not even the qmldir would have to be installed. We still want to copy or generate those files into the build directory, so that the -i option to qmllint and qmlcachegen points to a complete module.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              ulherman Ulf Hermann
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes