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

QQmlProperty::read should take a const QObject *

    XMLWordPrintable

Details

    Description

      QQmlProperty has static read and write convenience methods. They both accept a non-const QObject * as their target, but only the write methods require a non-const QObject *.

      The read convenience methods thus can't be used from a const method without doing a const_cast.

      edit:

      Actually, it's the constructor which doesn't accept a const QObject *. This may be by design, but it prevents QQmlProperty from being used in a const method.

      Attachments

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

        Activity

          People

            416365416c Alan Alpert
            mjmvisser Mark Visser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes