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

Deprecate/remove QTaggedPointer<T>::operator=(T*)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.3.1
    • Core: Other
    • None

    Description

      As discussed in QTBUG-103387 and https://codereview.qt-project.org/c/qt/qtbase/+/428958/4 , QTaggedPointer's usage of operator= with a raw pointer is error prone.

      Such an operator should be removed and replaced with a setPointer method or similar, to avoid mistakes when the user meant to fully reset the pointer AND the tag.

      (The implicitly-generated operator is fine. The problem is the user-declared one.)

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes