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

Create plugin.qmltypes automatically at build time

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.15.0 Beta1
    • Component/s: QML: Tooling
    • Labels:

      Description

      The plugin.qmltypes files are generated by qmlplugindump manually and they are checked into version control inside Qt.

      We should replace the need to generate the file manually by extracting all relevant information from the QObject subclasses in the project at build time and generating the file on the fly.

      By generating it automatically and unconditionally, tools that want to perform static type analysis can rely on these files for precise work.

      A successful extraction process requires eliminating the imperative qmlRegisterType<T>(module, element, version, etc..) API by annotating the type T and letting the moc generated code automatically call qmlRegisterType<T> for automatic registration.

      On the build system level the extraction could be done by placing the static meta-object into a special section of the object file - similar to how we store the plugin json meta-data in a special section - and extracting that data after the creation of the .o file. There is a limited number of .o files that need to be supported.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              ulherman Ulf Hermann
              Reporter:
              shausman Simon Hausmann
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews