Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.0 , 5.7.1, 5.8
-
caa5358fe97becafeba9631f4c4d2fc69469afb1
Description
This is somewhat hard to explain, but if you have a file structure like this:
main.qml
uses Bug
uses Zub
Bug.qml
imports foo
Zub.qml
imports foo
foo is a module imported from http://...
Bug.qml will fail to load with:
file:///C:/Users/josh/scratch/qt/qtbug-xxxxx/main.qml:7:3: Type Bug unavailable Bug { ^ file:///C:/Users/josh/scratch/qt/qtbug-xxxxx/Bug.qml:2:1: module "foo" is not installed import foo 1.0 ^
If you do any of the following:
1) Add "import foo 1.0" to main.qml
2) Remove Bug from use in main.qml
3) Remove Zub from use in main.qml
Everything works fine.
Internally this seems to be because the two QQmlTypeLoader::Blob objects share a QQmlQmldirData object, but they don't expect to be doing so, and their use of the Import and priority on QQmlQmldirData conflicts.