diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-22 16:36:42 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-10 18:01:27 +0100 |
commit | 1cd494fbfb3eaf21717697c3c7df39b214b48ee3 (patch) | |
tree | 6ec56567a6f3355b1814ac18169d354239a729fc /src/imports/labsanimation | |
parent | 8550dff55c62b4f2b588513014b5cad8fe2c5f5b (diff) |
Generate registrations for all imports
Now that we can generate all QML type information at build time, we
should also use it.
Move the types for QtTest into the testlib import plugin. They don't
need to be exported from QtQuickTest.
Trigger the resource initialization of the shapes library from the
plugin so that we retain a dependency and the linker doesn't optimize
the module initialization away.
Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/imports/labsanimation')
-rw-r--r-- | src/imports/labsanimation/labsanimation.pro | 1 | ||||
-rw-r--r-- | src/imports/labsanimation/plugin.cpp | 12 | ||||
-rw-r--r-- | src/imports/labsanimation/plugins.qmltypes | 36 |
3 files changed, 4 insertions, 45 deletions
diff --git a/src/imports/labsanimation/labsanimation.pro b/src/imports/labsanimation/labsanimation.pro index 128bc28ddb..f64ae775c6 100644 --- a/src/imports/labsanimation/labsanimation.pro +++ b/src/imports/labsanimation/labsanimation.pro @@ -12,4 +12,5 @@ HEADERS += \ QT = qml-private quick-private +CONFIG += qmltypes install_qmltypes load(qml_plugin) diff --git a/src/imports/labsanimation/plugin.cpp b/src/imports/labsanimation/plugin.cpp index a74a30663a..bd732a6aba 100644 --- a/src/imports/labsanimation/plugin.cpp +++ b/src/imports/labsanimation/plugin.cpp @@ -61,18 +61,12 @@ QT_BEGIN_NAMESPACE */ //![class decl] -class QtLabsAnimationPlugin : public QQmlExtensionPlugin +class QtLabsAnimationPlugin : public QQmlEngineExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid) public: - QtLabsAnimationPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { } - void registerTypes(const char *uri) override - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.animation")); - qmlRegisterTypesAndRevisions<QQuickBoundaryRule>(uri, 1); - qmlRegisterModule(uri, 1, 0); - } + QtLabsAnimationPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) { } }; //![class decl] diff --git a/src/imports/labsanimation/plugins.qmltypes b/src/imports/labsanimation/plugins.qmltypes deleted file mode 100644 index 2ecc5e6f5d..0000000000 --- a/src/imports/labsanimation/plugins.qmltypes +++ /dev/null @@ -1,36 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt.labs.animation 1.0' - -Module { - dependencies: [] - Component { - name: "QQuickBoundaryRule" - prototype: "QObject" - exports: ["Qt.labs.animation/BoundaryRule 1.0"] - exportMetaObjectRevisions: [0] - Enum { - name: "OvershootFilter" - values: { - "None": 0, - "Peak": 1 - } - } - Property { name: "enabled"; type: "bool" } - Property { name: "minimum"; type: "double" } - Property { name: "minimumOvershoot"; type: "double" } - Property { name: "maximum"; type: "double" } - Property { name: "maximumOvershoot"; type: "double" } - Property { name: "overshootScale"; type: "double" } - Property { name: "currentOvershoot"; type: "double"; isReadonly: true } - Property { name: "peakOvershoot"; type: "double"; isReadonly: true } - Property { name: "overshootFilter"; type: "OvershootFilter" } - Property { name: "easing"; type: "QEasingCurve" } - Property { name: "returnDuration"; type: "int" } - Method { name: "returnToBounds"; type: "bool" } - } -} |