aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/settings
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-08-22 16:36:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-01-10 18:01:27 +0100
commit1cd494fbfb3eaf21717697c3c7df39b214b48ee3 (patch)
tree6ec56567a6f3355b1814ac18169d354239a729fc /src/imports/settings
parent8550dff55c62b4f2b588513014b5cad8fe2c5f5b (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/settings')
-rw-r--r--src/imports/settings/plugin.cpp12
-rw-r--r--src/imports/settings/plugins.qmltypes36
-rw-r--r--src/imports/settings/settings.pro2
3 files changed, 5 insertions, 45 deletions
diff --git a/src/imports/settings/plugin.cpp b/src/imports/settings/plugin.cpp
index db941d9845..24ff43ea6f 100644
--- a/src/imports/settings/plugin.cpp
+++ b/src/imports/settings/plugin.cpp
@@ -44,19 +44,13 @@
QT_BEGIN_NAMESPACE
-class QmlSettingsPlugin : public QQmlExtensionPlugin
+class QmlSettingsPlugin : public QQmlEngineExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+ Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
public:
- QmlSettingsPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { }
- void registerTypes(const char *uri) override
- {
- Q_ASSERT(QByteArray(uri) == QByteArray("Qt.labs.settings"));
- qmlRegisterTypesAndRevisions<QQmlSettings>(uri, 1);
- qmlRegisterModule(uri, 1, 1); // QTBUG-73239
- }
+ QmlSettingsPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) {}
};
QT_END_NAMESPACE
diff --git a/src/imports/settings/plugins.qmltypes b/src/imports/settings/plugins.qmltypes
deleted file mode 100644
index bbc5c1cf8f..0000000000
--- a/src/imports/settings/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.settings 1.1'
-
-Module {
- dependencies: []
- Component {
- name: "QQmlSettings"
- prototype: "QObject"
- exports: ["Qt.labs.settings/Settings 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "category"; type: "string" }
- Property { name: "fileName"; type: "string" }
- Method {
- name: "value"
- type: "QVariant"
- Parameter { name: "key"; type: "string" }
- Parameter { name: "defaultValue"; type: "QVariant" }
- }
- Method {
- name: "value"
- type: "QVariant"
- Parameter { name: "key"; type: "string" }
- }
- Method {
- name: "setValue"
- Parameter { name: "key"; type: "string" }
- Parameter { name: "value"; type: "QVariant" }
- }
- Method { name: "sync" }
- }
-}
diff --git a/src/imports/settings/settings.pro b/src/imports/settings/settings.pro
index 816a6a9fef..d8062a2e55 100644
--- a/src/imports/settings/settings.pro
+++ b/src/imports/settings/settings.pro
@@ -12,4 +12,6 @@ SOURCES += \
plugin.cpp \
qqmlsettings.cpp
+CONFIG += qmltypes install_qmltypes
+
load(qml_plugin)