Details
-
Technical task
-
Resolution: Done
-
P1: Critical
-
None
-
None
Description
Many QML plugins only serve to dynamically load their base libaries. The qtquick2 plugin is linked to libQtQuick.so and loading it loads the types in the QtQuick module. The same holds for QtQml.WorkerScript, QtQml.Models, and most of the QtQuickControls2 style plugins. Furthermore, the headers of types defined in plugins are inaccessible to the QML compiler. Therefore, all types we actually want to use have to be defined in the base libraries.
The way forward is to have an extra parameter to check whether the module in question is already loadable when parsing the qmldir file. If so, no plugin has to be loaded. Therefore if you do the equivalent of "QT += quick" to link QtQuick into your application, you can skip the plugin loading.
An extra directive in the qmldir file shall be given to tell the user to do this rather than rely on the plugin loading.
Furthermore, eventually the QML type loader should at least optionally warn when loading a plugin. We should push users towards linking the libraries that contain the types rather than loading them at runtime.
Attachments
Issue Links
- is duplicated by
-
QTBUG-82767 QML plugins are redundant
- Open
- relates to
-
QTBUG-90487 Make all QML plugins optional
- Closed