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

QList regression on insert/remove elements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.4.2
    • None
    • All

      If a QList contains unique pointers, they get deleted after a new item has been appended to the list.

      I.e.
      typedef std::unique_ptr<X> XPtr;
      QList<XPtr> x;
      ...
      x.push_back(new XPtr()); <-- here all the items of x will be destroyed!

      This is a huge regression as it silently breaks compatibility with older code and violates ideology of list-based containers.

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

            mmutz Marc Mutz
            ars.masiuk Ars Masiuk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes