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

[Documentation] QHash is documented to not change order of items in the hash on erase()

    XMLWordPrintable

Details

    Description

      But it might. When an item is freed, if there was previously another element inserted that would have otherwise ended up in that slot it will have moved to the next 'free' slot. So, when an element is erase()d we move the second element into its slot. This item may happen to be an item that has been visited earlier!

      Example found here:
      https://doc.qt.io/qt-6/qhash.html#erase

      Attachments

        Issue Links

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

          Activity

            People

              cnn Qt Core & Network
              manordheim Mårten Nordheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes