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"));