I have a binding to an array reduce function, looking like that:
Item {
property int preferredHeight: mainItem.children.reduce(maximumImplicitHeightReducer, 0) + topPadding + bottomPadding
function maximumImplicitHeightReducer(accumulator: real, item: Item): real {
return Math.max(accumulator, item.implicitHeight);
}
This generates the attached crash log on startup.
If i replace the call to the function maximumImplicitHeightReducer to an inline arrow function like that:
property int preferredHeight: mainItem.children.reduce((accumulator, item) => { return Math.max(accumulator, item.implicitHeight); }, 0) + topPadding + bottomPadding
then the crash goes away
- relates to
-
QTBUG-119885 Function signatures are insufficiently enforced
-
- Closed
-
| For Gerrit Dashboard: QTBUG-119395 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 523914,2 | QML: Don't crash when calling coerceAndCall() with null thisObject | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 524086,2 | QML: Don't crash when calling coerceAndCall() with null thisObject | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 524152,3 | QML: Don't crash when calling coerceAndCall() with null thisObject | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |