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

QMap<QString, int> Problem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.6.0
    • None
    • Fedora 38 (as explained above)
    • Linux/X11

    Description

      Hello,

      I'm running Fedora 38 with Qt 6.6 installed from the 'normal repo'.

      When trying to use QMap<QString, int> examples from the documentation

      Web-Site (https://pages-test.qt.io/qt-6/qmap.html), especially the 1st

      example (QMap<QString, int> map), I realize a strange behavior. After inserting

      3 entries to the map, 'map.size ()' returns '1', and access to all entries

      (e.g., map["three"]) returns the last entered value (i.e., '12', the value entered

      using '.insert ()').

      Also the iterator sample (a bit down below on the above mentioned

      documentation) does not work. it only outputs the 1st entry (i.e., key: "one")

      with the final entered value (i.e., '12').

      Is this an intended behavior?

      Or did I miss something?

      Exchanging the 'QString' by 'std::string' (btw., I'm using 'C++') works as expected.

      What's wrong?

      Is the Documentation not updated to the latest behavior / implementation?

      Or is it a 'Qt-Bug'?

       

      Regards

      G.Glock

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            gggermany G. Glock
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes