aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/shapes
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/shapes')
-rw-r--r--src/imports/shapes/CMakeLists.txt1
-rw-r--r--src/imports/shapes/plugin.cpp14
2 files changed, 6 insertions, 9 deletions
diff --git a/src/imports/shapes/CMakeLists.txt b/src/imports/shapes/CMakeLists.txt
index 78f6d9f448..bc25b33e14 100644
--- a/src/imports/shapes/CMakeLists.txt
+++ b/src/imports/shapes/CMakeLists.txt
@@ -9,6 +9,7 @@ qt_internal_add_qml_module(qmlshapesplugin
VERSION "${CMAKE_PROJECT_VERSION}"
CLASSNAME QmlShapesPlugin
SKIP_TYPE_REGISTRATION
+ PLUGIN_OPTIONAL
SOURCES
plugin.cpp
PUBLIC_LIBRARIES
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);
}
};