qt5base-lts/qmake
Giuseppe D'Angelo 14090760a8 Long Live QMap as a refcounted std::map!
... and QMultiMap as std::multimap.

Just use the implementation from the STL; we can't really claim that
our code is much better than STL's, or does things any differently
(de facto they're both red-black trees).

Decouple QMultiMap from QMap, by making it NOT inherit from
QMap any longer. This completes the deprecation started in 5.15:
QMap now does not store duplicated keys any more.

Something to establish is where to put the
QExplictlySharedDataPointer replcement that is in there as an
ad-hoc solution. There's a number of patches in-flight by Marc
that try to introduce the same (or very similar) functionality.

Miscellanea changes to the Q(Multi)Map code itself:

* consistently use size_type instead of int;
* pass iterators by value;
* drop QT_STRICT_ITERATORS;
* iterators implictly convert to const_iterators, and APIs
  take const_iterators;
* iterators are just bidirectional and not random access;
* added noexcept where it makes sense;
* "inline" dropped (churn);
* qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE);
* operator== on Q(Multi)Map requires operator== on the key type
  (we're checking for equality, not equivalence!).

Very few breakages occur in qtbase.

[ChangeLog][Potentially Source-Incompatible Changes] QMap does not
support multiple equivalent keys any more. Any related functionality
has been removed from QMap, following the deprecation that happened
in Qt 5.15. Use QMultiMap for this use case.

[ChangeLog][Potentially Source-Incompatible Changes] QMap and
QMultiMap iterators random-access API have been removed. Note that
the iterators have always been just bidirectional; moving
an iterator by N positions can still be achieved using std::next
or std::advance, at the same cost as before (O(N)).

[ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does
not inherit from QMap any more. Amongst other things, this means
that iterators on a QMultiMap now belong to the QMultiMap class
(and not to the QMap class); new Java iterators have been added.

Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-06 19:15:39 +02:00
..
doc iOS: Add a variable to customize where the launch image is taken from 2020-07-22 00:42:36 +02:00
generators iOS: Add a variable to customize where the launch image is taken from 2020-07-22 00:42:36 +02:00
library Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00
.prev_CMakeLists.txt Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
cachekeys.h qmake: fix a few deprecated QChar(non-char-type) warnings 2020-05-12 07:43:48 +02:00
CMakeLists.txt Long Live QMap as a refcounted std::map! 2020-08-06 19:15:39 +02:00
main.cpp Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
Makefile.unix Long Live QMap as a refcounted std::map! 2020-08-06 19:15:39 +02:00
Makefile.unix.macos macOS: Merge qcore_mac cpp and mm files 2020-03-12 06:07:35 +01:00
Makefile.unix.mingw Compile QRegularExpression into qmake 2020-05-05 18:41:20 +02:00
Makefile.unix.unix
Makefile.unix.win32 Compile QRegularExpression into qmake 2020-05-05 18:41:20 +02:00
Makefile.win32 Long Live QMap as a refcounted std::map! 2020-08-06 19:15:39 +02:00
meta.cpp qmake: Remove dead code 2019-04-05 07:48:34 +00:00
meta.h qmake: Remove dead code 2019-04-05 07:48:34 +00:00
option.cpp Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00
option.h Remove QMake's -createstub option 2019-08-03 14:48:10 +02:00
project.cpp Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
project.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
property.cpp Remove leftovers from QML1 2019-10-10 11:28:19 +02:00
property.h
qmake_pch.h Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
qmake-aux.pro
qmake.pro Long Live QMap as a refcounted std::map! 2020-08-06 19:15:39 +02:00