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

QSharedPointer doc needs to deal with forward declaration issue

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • None
    • Documentation
    • None

    Description

      QScopedPointer and and QSharedPointer have interesting, non-intuitive issues with forward-declared classes when being used as class members. The requirements to use them correctly in such contexts are documented for QScopedPointer (paragraph "Forward Declared Pointers"), but not for QSharedPointer. In my experience, developers stumble over this issue all the time, so it should definitely be explained in the documentation.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            kandeler Christian Kandeler
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes