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

URI and VERSION should be optional in qt_add_qml_module




      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.


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



            qtbuildsystem Qt Build System Team
            ulherman Ulf Hermann
            0 Vote for this issue
            2 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes