qt5base-lts/tests/auto/corelib/tools/qmap
Mathias Hasselmann 50e2db6a75 Add first/last accessors to QMap
QMap explicitly sorts its entries by key value. For an ordered container
it's (often?) useful to access the first or last entry, for instance to
quickly compute the next key of the mapping. The first entry is easily
accessible by the STL begin() method, but for accessing the last entry
pretty ugly iterator arithmetics must be applied: *(end() - 1). With
their first() and last() accessors the container classes QList and
QVector provide a much nicer method of accessing extrema, so for
consistency this syntactical sugar also should be applied to QMap.

Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-09-08 16:13:16 +02:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qmap.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qmap.cpp Add first/last accessors to QMap 2013-09-08 16:13:16 +02:00