path: root/qmake/Makefile.unix
diff options
authorGiuseppe D'Angelo <>2020-07-22 14:07:48 +0200
committerGiuseppe D'Angelo <>2020-08-06 19:15:39 +0200
commit14090760a87f23509b7bb5ad846537c766cb44a5 (patch)
tree1bdaa0b0ca86c17579aef1fa673344bc2008a40a /qmake/Makefile.unix
parent7d27316d9fe736fd863dbd389571ee7906d6e559 (diff)
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 <> Reviewed-by: Lars Knoll <>
Diffstat (limited to 'qmake/Makefile.unix')
1 files changed, 1 insertions, 2 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 75d3fe3ca7..da49bb3177 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -30,7 +30,7 @@ QOBJS = \
qarraydata.o qbitarray.o qbytearray.o qbytearraylist.o qbytearraymatcher.o \
qcalendar.o qgregoriancalendar.o qromancalendar.o \
qcryptographichash.o qdatetime.o qhash.o \
- qlocale.o qlocale_tools.o qmap.o qregularexpression.o qringbuffer.o \
+ qlocale.o qlocale_tools.o qregularexpression.o qringbuffer.o \
qstringbuilder.o qstring.o qstringconverter.o qstringlist.o qversionnumber.o \
qvsnprintf.o \
pcre2_auto_possess.o pcre2_chartables.o pcre2_compile.o pcre2_config.o \
@@ -129,7 +129,6 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
$(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp \
$(SOURCE_PATH)/src/corelib/tools/qhash.cpp \
- $(SOURCE_PATH)/src/corelib/tools/qmap.cpp \
$(SOURCE_PATH)/src/corelib/tools/qringbuffer.cpp \
$(SOURCE_PATH)/src/corelib/tools/qversionnumber.cpp \
$(SOURCE_PATH)/src/3rdparty/pcre2/src/pcre2_auto_possess.c \