diff options
Diffstat (limited to 'src/corelib/tools/qmap.cpp')
-rw-r--r-- | src/corelib/tools/qmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 406eb31923..94ed47f898 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -399,7 +399,9 @@ void QMapDataBase::freeData(QMapDataBase *d) With QMap, the items are always sorted by key. \li The key type of a QHash must provide operator==() and a global qHash(Key) function. The key type of a QMap must provide - operator<() specifying a total order. + operator<() specifying a total order. Since Qt 5.8.1 it is also safe + to use a pointer type as key, even if the underlying operator<() + does not provide a total order. \endlist Here's an example QMap with QString keys and \c int values: |