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

There is no QMultiHashIterator, even though there is a QMultiMapIterator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 6.0.0 Alpha
    • None
    • f2df8033f0ab1f27cf2310e32c4c13631bbaca63 (qt/qtbase/dev)

      As of today's qtbase, the following does not compile:

      #include <QtCore>
      
      int main(int argc, char *argv[])
      {
          QMultiHash<int, int> mm;
      
          mm.insert(0, 0);
          mm.insert(1, 10);
          mm.insert(2, 100);
          mm.insert(2, 200);
          mm.insert(3, 1000);
          mm.insert(3, 2000);
          mm.insert(3, 3000);
      
          QMultiHashIterator it(mm);
          while (it.hasNext()) {
              qDebug() << it.key() << it.value();
              it.next();
          }
      
          return 0;
      }
      

      whereas the equivalent code using a QMultiMap does.

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

            laknoll Lars Knoll
            vhilshei Volker Hilsheimer
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes