Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.7.2
-
None
Description
On a project using the QML Compiler, connecting a custom signal to a function, anonymous or named results in a warning on the block where the connection is taking place, for being unable to generate efficient code for the lookup of function property.
The following example can be copy-pasted into a main.qml to re-produce the issue:
> Warning: Main.qml:4:18: Could not compile binding for onCompleted: Cannot generate efficient code for lookup of function property. [compiler]
> qtobject.mySignal.connect( () => { } );
> ^^^^^^^^
import QtQuick
Window {
Component.onCompleted: {
qtobject.mySignal.connect( () => { } );
}
QtObject {
id: qtobject
signal mySignal()
}
}