Fix qdoc warning about missing QMultiMap code snippet
Bring back missing code snippet src_corelib_tools_qmultimap.cpp#19, fixing: qtbase/src/corelib/tools/qmultimap.qdoc:1007 Command '\snippet (//! [19])' failed at end of file 'qtbase/src/corelib/doc/snippets/code/src_corelib_tools_qmultimap.cpp' As a drive-by, use a more modern form, avoiding repeated invocation of end(). Amends 3236b64db8bb26a6c1c2c288cb47ecc08a7d526f. Task-number: QTBUG-105109 Pick-to: 6.5 6.2 Change-Id: I09635eedd773ed16517773a9bf282b0386beba26 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
be8b3efae6
commit
aa6339594e
@ -171,19 +171,10 @@ multimap.upperBound(10); // returns end()
|
|||||||
multimap.upperBound(999); // returns end()
|
multimap.upperBound(999); // returns end()
|
||||||
//! [17]
|
//! [17]
|
||||||
|
|
||||||
|
//! [19]
|
||||||
//! [18]
|
for (auto it = multimap.begin(), end = multimap.end(); i != end; ++i)
|
||||||
QMultiMap<QString, int> multimap;
|
i.value() += 2;
|
||||||
multimap.insert("January", 1);
|
//! [19]
|
||||||
multimap.insert("February", 2);
|
|
||||||
...
|
|
||||||
multimap.insert("December", 12);
|
|
||||||
|
|
||||||
QMap<QString, int>::iterator i;
|
|
||||||
for (i = multimap.begin(); i != multimap.end(); ++i)
|
|
||||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
|
||||||
//! [18]
|
|
||||||
|
|
||||||
|
|
||||||
void erase()
|
void erase()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user