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

QQmlPropertyMap constructor is declared in public header but has unstable ABI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10.0 Alpha
    • 5.4.1
    • None
    • Okay, I think using a delegating constructor that is actually possible now.

    Description

      The QQmlPropertyMap protected template constructor is defined as:

      template<class DerivedType>
      QQmlPropertyMap(DerivedType *derived, QObject *parentObj)
          : QObject(*allocatePrivate(), parentObj)
      

      Here, the result of allocatePrivate() dereferencing is of type QObjectPrivate, which has unstable ABI (i.e. its size can change).

      So the code using this constructor (i.e. gsettings-qt does it) will break whenever QObjectPrivate changes, which is not ideal.

      As Qt promises being binary compatible, such stuff should not be exposed in public headers.

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            mandriver Dmitry Shachnev
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes