Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.15, 6.8
-
None
-
Ubuntu
-
-
f6f20242e (dev)
Description
In Qt5 `arguments` was available in both regular functions and arrow functions, what is not in line with JS specification. In Qt 6 `arguments` is no longer available within arrow functions, but in some circumstances leads to segfault, instead of printing error regarding undefined reference.
Marked also as a 5.15 bug because `arguments` should not be available for arrow functions there.
import QtQuick import QtQuick.Controls Window { id: root visible: true Item { id: item signal hello(string arg) Button { text: "button" onClicked: item.hello("world") } onHello: (arg) => { console.log(JSON.stringify(arguments)) } } }
Attachments
For Gerrit Dashboard: QTBUG-134215 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
633799,5 | Avoid incorrect access to arguments in signal bindings to arrow functions | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |