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

QMap needs a QMap<Key, T>::useAlphanumericalSorting(bool) options to disable sorting when position iterators are used via insert/insertMulti

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.3.2
    • None

    Description

      QMap::insert(const_iterator, Key, T) and QMap::insertMulti(const_iterator, Key, T) will keep a alphanumerically sorted node list due to a simple checking function call (see [a]).
      This should include as user controllable flag to disable/enable (see [b]);

      [a]: if (!qMapLessThanKey(n->key, akey))
      return this->insertMulti(akey, avalue); // ignore hint

      [b]: if ( use_alphanumerical_sorting && !qMapLessThanKey(n->key, akey))
      return this->insertMulti(akey, avalue); // ignore hint

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            surgemcgee Robert Steckroth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes