Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Fixed
-
Affects Version/s: 5.12.4
-
Fix Version/s: 5.12.5, 5.13.1, 5.14.0 Alpha
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:None
-
Environment:Qt 5.12.4, runs with qmlscene
-
Platform/s:
-
Commits:d94dd247ecd6753150dc2a7ef6be4ccb482e9423
Description
I added singleton qml type into higher plugin version and lower version stopped working.
I would like to use version 0.9, but I cannot, because it cannot find MySettings component, which is defined only for version 1.0. - but I dont want to use this new component, all I want is old component of version 0.9.
Here is a quick example:
main.qml ./imports/MyPlugin/MyComponent_0_9.qml ./imports/MyPlugin/MyComponent_1_0.qml ./imports/MyPlugin/MySettings_1_0.qml ./imports/MyPlugin/qmldir
//file: main.qml import QtQuick 2.12 import MyPlugin 0.9 //this works fine //import MyPlugin 1.0 Item { width: 100 height: 100 MyComponent { anchors.centerIn: parent } }
//file: qmldir
module MyPlugin
MyComponent 0.9 MyComponent_0_9.qml
MyComponent 1.0 MyComponent_1_0.qml
singleton MySettings 1.0 MySettings_1_0.qml
//file MySettings_1_0.qml pragma Singleton import QtQuick 2.0 Item { property int baseWidth: 50 }
MyComponent are just simple rectangles.
When I run it by:
qmlscene main.qml -I ./imports
I see error:
main.qml:-1 MySettings is not a type
Looks like problem is that components of different major versions are declared in the same qmldir file.