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 3236b64db8
.
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()
|
||||
//! [17]
|
||||
|
||||
|
||||
//! [18]
|
||||
QMultiMap<QString, int> multimap;
|
||||
multimap.insert("January", 1);
|
||||
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]
|
||||
|
||||
//! [19]
|
||||
for (auto it = multimap.begin(), end = multimap.end(); i != end; ++i)
|
||||
i.value() += 2;
|
||||
//! [19]
|
||||
|
||||
void erase()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user