Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3
-
None
-
ae3905531 (dev)
Description
Consider:
pragma Strict import QtQml QtObject { property list<QtObject> elms function remove(elm : QtObject) { for (var i = 0; i < elms.length; i++) { var value = elms[i]; if (value != elm) { // TODO: produces QJSValue } } } }
This produces:
OrderedCollection.qml:10: (strict mode) Could not compile function remove: Cannot generate efficient code for incomparable types conversion to QJSValue and conversion to QVariant
There is no reason to generate a QJSValue here, and the right hand side can be a straight QObject*.
Attachments
For Gerrit Dashboard: QTBUG-117799 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
515698,7 | QmlCompiler: Allow comparison of optional types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |