Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141760

Refactor UiPublicMember and UiPropertyAttributes

XMLWordPrintable

      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 

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtqmlteam Qt Qml Team User
            dima.a Dmitrii Akshintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes