Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.15.0
-
Fix Version/s: 6.1.0 Beta 1, 6.1
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:
-
Platform/s:
-
Commits:64102ae231317eb6f637304918e55153dadef72d (qt/qtdeclarative/dev) 0c029b420ea9b7631cf87d427c0821320064c01b (qt/qtdeclarative/6.1)
Description
When registering singletons using QJSValue (https://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterSingletonType) only QJSValues based on objects work properly, all others become undefined.
Doesn't work:
- 5
- "fooBar"
Works: - new Number(5) / new Object(5)
- new String("fooBar") / new Object("fooBar")