diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-01-26 13:48:44 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-02-04 09:29:10 +0100 |
commit | e0c0fd5713c27b1bf9536213cee33494ac734f2d (patch) | |
tree | f671084536a85a19f5d968b0f3c05aa2031d786e /src/imports/shapes/plugin.cpp | |
parent | 5fb34b67b810ca284c216009925f4f38220c4510 (diff) |
QtQuick.Shapes: Make plugin optional
Mark plugin as optional and move out initialization code as to allow use with
the QML compiler.
Change-Id: I4c93168ebd42b6625fbf4c045beac4dcf41aafa6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/imports/shapes/plugin.cpp')
-rw-r--r-- | src/imports/shapes/plugin.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/imports/shapes/plugin.cpp b/src/imports/shapes/plugin.cpp index 48eecbd8f1..9a7f5dc77f 100644 --- a/src/imports/shapes/plugin.cpp +++ b/src/imports/shapes/plugin.cpp @@ -43,23 +43,19 @@ QT_BEGIN_NAMESPACE -class QmlShapesPlugin : public QQmlExtensionPlugin +class QmlShapesPlugin : public QQmlEngineExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid) public: QmlShapesPlugin(QObject *parent = nullptr) - : QQmlExtensionPlugin(parent) + : QQmlEngineExtensionPlugin(parent) { volatile auto registration = &qml_register_types_QtQuick_Shapes; + volatile auto initialize = &QQuickShapes_initializeModule; Q_UNUSED(registration); - } - - void registerTypes(const char *uri) override - { - Q_UNUSED(uri); - QQuickShapesModule::defineModule(); + Q_UNUSED(initialize); } }; |