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

QML plugins are redundant

    XMLWordPrintable

Details

    Description

      We currently provide largely empty plugins for many of our QML modules, simply to link the resepective libraries at runtime rather than at compile time. In particular we have:

      • QtQml and qmlplugin
      • QtQuick and qtquick2plugin
      • QtQmlModels and modelsplugin
      • QtQmlWorkerScript and workerscriptplugin
      • QtQuickTest and qmltestplugin
      • QtQuickShapes and qmlshapesplugin
      • QtQuickParticles and particlesplugin

      The duplication is pure overhead. Also, by requiring the plugins to drive the library initialization, we run into linking problems: As the empty plugins don't reference any symbols from the libraries, the linker tends to "optimize" the type registrations or even the whole dependency out. Several hacks have been introduced to avoid this.

      Instead of loading those plugins at runtime, the target application could just link the respective modules at compile time. The QML engine could detect that the types are already available and skip the plugin loading.

      As a second step, the plugins in question, when loaded, could advise the user via a warning to link the library instead.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              ulherman Ulf Hermann
              Vladimir Minenko Vladimir Minenko
              Cristian Maureira-Fredes Cristian Maureira-Fredes
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes