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

Rename QQuickItem::geometryChanged to geometryChange

    XMLWordPrintable

    Details

    • Sprint:
      Q1/2020 Finale, Q2/2020 kick off, WIP and Qt 6

      Description

      https://doc.qt.io/qt-5/qquickitem.html

      The convention in Qt Quick and Qt Quick Controls 2 is to use "nounChange" for virtual functions that should handle some change, and "nounChanged" for signals that notify objects of that change.

      geometryChanged does not follow that convention:

      virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
      

      compare that to itemChange:

      virtual void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value)
      

      Not only would renaming geometryChanged to geometryChange allow us to fix this inconsistency, but it would also allow us to add a geometryChanged signal as a public API (item change listeners are private) for listening to geometry changes in an item without listening to all individual x/y/width/height properties: QTBUG-83050

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-82994
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              mitch_curtis Mitch Curtis
              Reporter:
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: