diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-04-05 15:13:00 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-05-04 01:03:51 +0200 |
commit | 7d542e1daf09caadf6d3e36c4b09bdf94952c5a1 (patch) | |
tree | 9ad7fea9b255e6a04544cc9a77e0bce8e831f961 /src/corelib/tools/qmap.qdoc | |
parent | 5c71312ba307a9b9c2637484c06bbe1cbe298b0e (diff) |
Brush up the container code snippets
- Bring iterator loops into a consistent form using auto and
creating and end variable, use cbegin()/cend() where suitable
- Use (std::)endl instead of Qt::endl for iostreams
- Fix removed container conversion API (QList::fromSet, QSet::toList())
- Use range-based for instead of foreach
- Use initializer lists
- Use qPrintable(QString) for output to std::ostream
- Use qsizetype
- Remove some unused snippets
Complements f6b137bdc43d4021cbbe602759dbcced2e04d638.
Pick-to: 6.5
Change-Id: I8a167099cdb224f45b984fa834d46269144a7ef0
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/tools/qmap.qdoc')
-rw-r--r-- | src/corelib/tools/qmap.qdoc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qmap.qdoc b/src/corelib/tools/qmap.qdoc index a5c5c59b4e..bbf20ef02b 100644 --- a/src/corelib/tools/qmap.qdoc +++ b/src/corelib/tools/qmap.qdoc @@ -97,7 +97,7 @@ QMultiMap. If you only need to extract the values from a map (not the keys), - you can also use \l{foreach}: + you can also use range-based for: \snippet code/src_corelib_tools_qmap.cpp 12 |