Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0 Alpha
-
None
-
-
7f6657337f3b0b43c089efd29c914d4af26395e2 (qt/qtdeclarative/5.12)
Description
Patch https://codereview.qt-project.org/#/c/212986/ introduces fine-grained signals for some Text properties.
Consider the follow code:
import QtQuick 2.11
Text {
onContentWidthChanged: console.trace()
}
The notifier of contentWidth is changed from contentSizeChanged() to contentWidthChanged() and the latter signal is Q_REVISION(12), so on Qt-5.11 the code works fine and the property change handler connects to contentSizeChanged.
On the other side, the same code on 5.12 fails, because the notifiers are not available in QtQuick 2.11 and earlier.
As far as I can see, the proper solution would be to extend revisions support in Q_PROPERTY macro so it will be possible to write
Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged) Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentWidthChanged REVISION 12)
and make the engine to use the older notifier on older import statement.
However such change is a significant development and it is too late to include it into the upcoming release.
See also: QTBUG-71243