Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.0.0
-
None
-
4317c442fd492121e2fc037a39b40653bbc34294
Description
Overriding an automatically generated property change signal can cause a crash in some circumstances, and it causes incorrect behaviour in other circumstances.
import QtQuick 2.0 Item { property int a: 10 onAChanged: console.log("onAChanged") // either of the following two lines causes the issue signal aChanged() //function aChanged() { console.log("aChanged"); } // note that automatic emission now fails also Component.onCompleted: { a = 20 } // you need a certain number of properties to trigger the issue property int b property int c property int d property int e property int f property int g property int h property int i property int j property int k property int l }
We should disallow property change notifications to be overridden. If the client wishes to provide their own notifications (eg, to provide parameters like old/new values) they should use a different signal name instead.