qmlplugindump (5.9 x86) incomplete output?
-
Hi, I have made a simple QML plug-in extension with a new widget type called PieSlice, following one of the Qt examples. I've added the needed metainfo information for having the widget shown in the designer library palette, and also have created the plugins.qmltypes file using the qmlplugindump tool. But the information exported is incomplete. This is the information exported:
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 LfpCharts 1.0 C:/dev/prj/qt/onlyimport -output C:/dev/prj/qt/onlyimport/LfpCharts/plugins.qmltypes' Module { dependencies: [] Component { name: "LfpCharts::PieSliceWidget" defaultProperty: "data" prototype: "QQuickPaintedItem" exports: ["LfpCharts/PieSliceWidget 1.0"] exportMetaObjectRevisions: [0] Property { name: "color"; type: "QColor" } Property { name: "fromAngle"; type: "int" } Property { name: "angleSpan"; type: "int" } } Component { name: "QQuickItem" defaultProperty: "data" prototype: "QObject" Enum { name: "TransformOrigin" values: { "TopLeft": 0, "Top": 1, "TopRight": 2, "Left": 3, "Center": 4, "Right": 5, "BottomLeft": 6, "Bottom": 7, "BottomRight": 8 } } Property { name: "parent"; type: "QQuickItem"; isPointer: true } [...] } Component { name: "QQuickPaintedItem" defaultProperty: "data" prototype: "QQuickItem" Enum { name: "RenderTarget" values: { "Image": 0, "FramebufferObject": 1, "InvertedYFramebufferObject": 2 } } Property { name: "contentsSize"; type: "QSize" } Property { name: "fillColor"; type: "QColor" } Property { name: "contentsScale"; type: "double" } Property { name: "renderTarget"; type: "RenderTarget" } Property { name: "textureSize"; type: "QSize" } } }
But the correct should be the one found in the plugins.qmltypes in QtQuick2:
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 LfpCharts 1.0 C:/dev/prj/qt/onlyimport -output C:/dev/prj/qt/onlyimport/LfpCharts/plugins.qmltypes' dependencies: [] Component { name: "LfpCharts::PieSliceWidget" defaultProperty: "data" prototype: "QQuickPaintedItem" exports: ["LfpCharts/PieSliceWidget 1.0"] exportMetaObjectRevisions: [0] Property { name: "color"; type: "QColor" } Property { name: "fromAngle"; type: "int" } Property { name: "angleSpan"; type: "int" } } Component { name: "QQuickItem" defaultProperty: "data" prototype: "QObject" exports: [ "QtQuick/Item 2.0", "QtQuick/Item 2.1", "QtQuick/Item 2.4", "QtQuick/Item 2.7" ] exportMetaObjectRevisions: [0, 1, 2, 7] Enum { name: "TransformOrigin" values: { "TopLeft": 0, "Top": 1, "TopRight": 2, "Left": 3, "Center": 4, "Right": 5, "BottomLeft": 6, "Bottom": 7, "BottomRight": 8 } } Property { name: "parent"; type: "QQuickItem"; isPointer: true } [...] } Component { name: "QQuickPaintedItem" defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/PaintedItem 2.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "RenderTarget" values: { "Image": 0, "FramebufferObject": 1, "InvertedYFramebufferObject": 2 } } Property { name: "contentsSize"; type: "QSize" } Property { name: "fillColor"; type: "QColor" } Property { name: "contentsScale"; type: "double" } Property { name: "renderTarget"; type: "RenderTarget" } Property { name: "textureSize"; type: "QSize" } } }
The basic but important differences is that qmlplugindump does not writes important information about exports for dependent components found:
exports: [ "QtQuick/Item 2.0", "QtQuick/Item 2.1", "QtQuick/Item 2.4", "QtQuick/Item 2.7" ] exportMetaObjectRevisions: [0, 1, 2, 7]
for QQuickItem and:
exports: ["QtQuick/PaintedItem 2.0"] isCreatable: false exportMetaObjectRevisions: [0]
for QQuickPaintedItem.
I've tried to use the -merge, and passing the plugins.qmltypes of the QQuick.2 library folder, but it fills too much data, and also the initial bad declared dependent components are also written.
The problem is that if I put the qmlplugindump tool into the .pro file so that when I make a change it remades the plugins.qmltype it will fail, as I will have to complete the lacking information, or using the merge option that I don't like very much because introduces too much unneeded data.
If I use the "bad output", the plug-in will work in runtime, but I will not be able to be seen the widget painted in the QQuick designer. Just by completing the "exports" data or adding the merge parameter, it will work.
Is there any way to make qmlplugindump to just dump all needed information with exports information also into the file just only for the needed dependencies?
Thanks in advance.
David.