Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
5.15, 6.8
-
None
-
Ubuntu
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
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134215 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
633799,2 | Avoid incorrect access to arguments in bindings to arrow functions | dev | qt/qtdeclarative | Status: NEW | 0 | -1 |