- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    5.15.0
- 
        
- 
        64102ae231317eb6f637304918e55153dadef72d (qt/qtdeclarative/dev) 0c029b420ea9b7631cf87d427c0821320064c01b (qt/qtdeclarative/6.1)
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")
| For Gerrit Dashboard: QTBUG-85615 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 333541,17 | Fix QJSValue singletons only supporting object types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 | 
| 335753,2 | Fix QJSValue singletons only supporting object types | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 |