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

Rename QQuickItem::geometryChanged to geometryChange

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • 6.0
    • None
    • None
    • Q1/2020 Finale, Q2/2020 kick off, Bug Fixing Candidates

    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

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

          Activity

            People

              mitch_curtis Mitch Curtis
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: