Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.0
-
None
-
Windows msvc2015 64 bit
Qt 5.11.0
-
2f4b8f159545b545d4b49cb3c1429c09522519ee
Description
Description
When I debug a QtQuick application and catch a signal in another Component than the one the signal is send from, and have a local variable defined there, it doesn't send the data through, it is undefined.
As soon as I remove the local variable it works. I also tested it with Qt 5.10.1 and there is no problem there.
I attached an example application illustrating the issue.
Example
Run with debugger:
// Sending main.qml Window { id: mainWindow signal test(var data) visible: true width: 640 height: 480 title: qsTr("Hello World") Timer { id: mytimer interval: 1000; running: true; repeat: true onTriggered: test("knock knock") } Component.onCompleted: { mytimer.start() } TestComponent { } onTest: { var localVar console.debug(data) } }
// Receiving TestComponent.qml Item { Connections { target: mainWindow onTest: { var test // comment this out and it works (also modify the source of the signal to update cache), why though? console.debug("test component: %1".arg(data)) // data is undefined! } } }
Attachments
Issue Links
- duplicates
-
QTBUG-68522 V4 messes up arguments and locals in "hasDirectEval" mode
- Closed