Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
5.15.0 Beta1, 6.0.0
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
- depends on
-
QTBUG-90627 Research a better PixmapCache <-> Image Provider interaction
-
- Open
-
- duplicates
-
QTBUG-84639 Get rid of most QML plugins
-
- Closed
-
- relates to
-
QTBUG-85591 qmlProtectModule() claims it "allows the engine to skip checking for a plugin when that uri is imported", but that might not be true
-
- Closed
-
-
QTBUG-90487 Make all QML plugins optional
-
- Closed
-
- resulted in
-
QTBUG-90487 Make all QML plugins optional
-
- Closed
-