Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.1, 5.1.0 , 5.13.0, 5.13.1
-
-
16683799681578d076c46b71f77d326ac304cc6e 220c1031fc3e0957c4d94c42d30fb33d1e023929
Description
This is true when loading from, e.g. http, but also via a custom scheme through a custom NetworkAccessManager.
I was going to try to package a minimal example, but it looks like qmlscene doesn't support anything that depends on a network-loaded module (it checks if the component is ready and quits if not... in this case it's still loading).
The gist is, if you have:
import foo 1.0
Foo {
}
where foo comes via a non-local URL, you get:
file:http://localhost:8000/foo/qmldir:1: only one module identifier directive may be defined in a qmldir file
This seems to boil down to
bool QQmlTypeLoader::Blob::qmldirDataAvailable(QQmlQmldirData *data, QList<QQmlError> *errors) { bool resolve = true; <--------- resolve defaults to true const QQmlScript::Import *import = data->import(); data->setImport(0); int priority = data->priority(); data->setPriority(0); if (import) { // Do we need to resolve this import? QHash<const QQmlScript::Import *, int>::iterator it = m_unresolvedImports.find(import); if (it != m_unresolvedImports.end()) { resolve = (*it == 0) || (*it > priority); } <------------ if import is not in m_unresolvedImports, resolve is still true
Attachments
Issue Links
- relates to
-
QTBUG-78098 Bug when loading a qml module via a URL, with singletons and inheritance
- Closed