diff options
author | Ulf Hermann <[email protected]> | 2019-10-11 18:03:52 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-10-15 13:20:11 +0200 |
commit | e9ae2014976cfc406f74f791ab1313ee369296fc (patch) | |
tree | ea31c33df0d8a0f58bb2e2a2c33d066598437354 /tests/auto/qml/qmlplugindump | |
parent | b08809b521591bd17955846fbeee651200983f3b (diff) |
qmlplugindump: Fix prototype and name for composite types
Before we would always merge everything up to QObject. That would
duplicate entries between types that inherit from the same base class.
Also, when the composite type doesn't specify a module (because we just
created a component from a plain QML file), use the module URI from our
version info. As we're dumping the component we can assume it belongs to
the module we're dumping.
Change-Id: Icf9a58cfe1165f557ebbf7309251e98a0782dc33
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'tests/auto/qml/qmlplugindump')
4 files changed, 18 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/Derived.qml b/tests/auto/qml/qmlplugindump/data/dumper/Imports/Derived.qml new file mode 100644 index 0000000000..2f0ac401d7 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/Derived.qml @@ -0,0 +1,6 @@ +pragma Singleton +import dumper.Imports 1.0 + +Imports { + property int something: 2 +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro index d20ea967ea..b4bd9baf5b 100644 --- a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro @@ -17,7 +17,7 @@ HEADERS += \ imports.h !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - cp.files = qmldir plugins.qmltypes CompositeImports.qml + cp.files = qmldir plugins.qmltypes CompositeImports.qml Derived.qml cp.path = $$OUT_PWD COPIES += cp } diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes index 937dd60a9e..fb13928ba0 100644 --- a/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes @@ -14,4 +14,14 @@ Module { exports: ["dumper.Imports/Imports 1.0"] exportMetaObjectRevisions: [0] } + Component { + prototype: "Imports" + name: "dumper.Imports/Derived 1.0" + exports: ["dumper.Imports/Derived 1.0"] + exportMetaObjectRevisions: [0] + isComposite: true + isCreatable: false + isSingleton: true + Property { name: "something"; type: "int" } + } } diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir index c9058a7f95..f84fca1d75 100644 --- a/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir @@ -1,3 +1,4 @@ module dumper.Imports plugin Imports CompositeImports 1.0 CompositeImports.qml +singleton Derived 1.0 Derived.qml |