diff options
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp index 7f743bbd25..e8754a5f34 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qlinkedlist.cpp @@ -112,17 +112,17 @@ list.append("December"); QLinkedList<QString>::iterator i; for (i = list.begin(); i != list.end(); ++i) - cout << *i << endl; + cout << *i << Qt::endl; //! [7] //! [8] QLinkedList<QString> list; ... -QLinkedList<QString>::iterator it = qFind(list.begin(), - list.end(), "Joel"); +QLinkedList<QString>::iterator it = std::find(list.begin(), + list.end(), "Joel"); if (it != list.end()) - cout << "Found Joel" << endl; + cout << "Found Joel" << Qt::endl; //! [8] @@ -182,17 +182,17 @@ list.append("December"); QLinkedList<QString>::const_iterator i; for (i = list.constBegin(); i != list.constEnd(); ++i) - cout << *i << endl; + cout << *i << Qt::endl; //! [14] //! [15] QLinkedList<QString> list; ... -QLinkedList<QString>::iterator it = qFind(list.constBegin(), - list.constEnd(), "Joel"); +QLinkedList<QString>::const_iterator it = std::find(list.constBegin(), + list.constEnd(), "Joel"); if (it != list.constEnd()) - cout << "Found Joel" << endl; + cout << "Found Joel" << Qt::endl; //! [15] |