-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Signal and Property are rather different properties at this point, however they are weirdly mixed up in UiPublicMember.
Instead of variant/union, the UiPublicMember somehow considered Signal by default, while at the same time duplicating multiple UiPropertyAttributes methods on its API, introducing quite some copy-paste.
The naming there is also rather confusing, for example
union {
SourceLocation m_propertyToken = SourceLocation {};
UiPropertyAttributes *m_attributes;
};
Which means that UiPropertyAttributes also contains a location of "propery" keyword/token, but m_propertyToken actually means token of the "signal" keyword
Additionally there could probably be better handling of property attributes themselves, instead of multiple same `if` conditions and warnings in the parser
Some ideas for better separation of concerns https://codereview.qt-project.org/c/qt/qtdeclarative/+/656089