summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/doc/src')
-rw-r--r--src/corelib/doc/src/containers.qdoc6
-rw-r--r--src/corelib/doc/src/includes/containers-range-constructor.qdocinc2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc
index 919533f651..d0bb251e81 100644
--- a/src/corelib/doc/src/containers.qdoc
+++ b/src/corelib/doc/src/containers.qdoc
@@ -66,6 +66,12 @@
Qt also offers a \l{foreach} keyword that make it very
easy to iterate over all the items stored in a container.
+ \note Since Qt 5.14, range constructors are available for most of the
+ container classes. QMultiMap is a notable exception. Their use is
+ encouraged in place of the various from/to methods. For example:
+
+ \snippet code/doc_src_containers.cpp 25
+
\section1 The Container Classes
Qt provides the following sequential containers: QList,
diff --git a/src/corelib/doc/src/includes/containers-range-constructor.qdocinc b/src/corelib/doc/src/includes/containers-range-constructor.qdocinc
new file mode 100644
index 0000000000..afb7e46b86
--- /dev/null
+++ b/src/corelib/doc/src/includes/containers-range-constructor.qdocinc
@@ -0,0 +1,2 @@
+ \note Since Qt 5.14, range constructors are available for Qt's generic
+ \l{container classes} and should be used in place of this method.