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

Some accessors in QDeclarativeView are const and other non const without a evident reason for it

    XMLWordPrintable

Details

    • 0b83a2161261be525f01359397ab1c8c34827749

    Description

      In QDeclarativeView you have

      QDeclarativeEngine * engine ()
      Returns a pointer to the QDeclarativeEngine used for instantiating QML Components.

      QDeclarativeContext * rootContext ()
      This function returns the root of the context hierarchy. Each QML component is instantiated in a QDeclarativeContext. QDeclarativeContext's are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this hierarchy is managed by the QDeclarativeEngine.

      QGraphicsObject * rootObject () const
      Returns the view's root item.

      All three return a pointer and reading the documentation one thinks all of them are just accessors so it would make sense for all three to be const, in case the two that are not const really modify the object it would be good if that was documented

      Attachments

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

        Activity

          People

            jpetrell Joona Petrell
            acidpk Albert Astals Cid (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes