Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0, 6.8.3, 6.9.0 RC
-
None
-
-
7d405c4e3 (dev), c78c563fa (6.9), 1e669127d (tqtc/lts-6.8), 7e3621536 (tqtc/lts-6.5)
Description
Using qmlRegisterSingletonInstance and engine.addImportPath with http url results in "module not installed".
The bug disappears when addImportPath is called with a local directory path.
The bug is present in versions 6.5.0 and newer. It is not present in 6.4.3 and older (including 5.15.2).
QScopedPointer<SingletonTypeExample> example(new SingletonTypeExample); QQmlApplicationEngine engine; // Works if path is a local one. engine.addImportPath(QString("http:/127.0.0.1/")); qmlRegisterSingletonInstance("Qt.example.qobjectSingleton", 1, 0, "MyApi", example.get()); engine.load(QUrl("qrc:/Main.qml"));
Attachments
For Gerrit Dashboard: QTBUG-135334 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
638228,7 | QtQml: Load pre-registered types if no remote qmldir can be found | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
640177,3 | QtQml: Load pre-registered types if no remote qmldir can be found | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
642378,3 | QtQml: Load pre-registered types if no remote qmldir can be found | tqtc/lts-6.8 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
642708,3 | QtQml: Load pre-registered types if no remote qmldir can be found | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |