diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-08-18 16:51:10 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-24 17:11:23 +0000 |
commit | b92f6dac20a9ea595ba41e00ab20215f33f99dc2 (patch) | |
tree | bacf5d4cf2015a2679d03dd8e73368cf460e4daf /src | |
parent | bff67a3ebfff06a27ac7281f7f491b57b7ba93a7 (diff) |
Doc: Remove "Container keywords" section from containers.html
For foreach, we just mention that it is deprecated, and forever is not
actually directly related to Qt containers. Both macros are also
documented in qglobal.cpp, and the section title is not referenced
anywhere so this patch won't break any links.
Change-Id: I6c3e11b205237e5b502173f2216606adf5812f55
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 4b3cb1329a36448bc636c9e43ed53b8b9e102acd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/doc/src/containers.qdoc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc index bed184de15..4ff333b7cc 100644 --- a/src/corelib/doc/src/containers.qdoc +++ b/src/corelib/doc/src/containers.qdoc @@ -333,28 +333,6 @@ on Java's iterator classes. New code should should prefer \l{STL-Style Iterators}. - \section1 Container keywords - - \target foreach - \section2 The foreach Keyword - \l{foreach-keyword}{The foreach keyword} is discouraged, new code should - prefer C++11 range-based loops. - - \target forever - \section2 The forever keyword. - In addition to \c foreach, Qt also provides a \c forever - pseudo-keyword for infinite loops: - - \snippet code/doc_src_containers.cpp 21 - - If you're worried about namespace pollution, you can disable - these macros by adding the following line to your \c .pro file: - - \snippet code/doc_src_containers.cpp 22 - - \note The alternative macros Q_FOREACH and Q_FOREVER remain defined - regardless. - \section1 Qt containers compared with std containers \table @@ -410,7 +388,7 @@ Qt includes other template classes that resemble containers in some respects. These classes don't provide iterators and cannot - be used with the \c foreach keyword. + be used with the \l foreach keyword. \list \li QCache<Key, T> provides a cache to store objects of a certain |