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

QList regression on insert/remove elements

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: