From 499957eb8b1c5150823f05f40f32b04ba13b1640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Tue, 24 Sep 2013 16:42:22 +0200 Subject: Improve implicit shared documentation a bit Task-number: QTBUG-27061 Change-Id: I66e000a9f59fda3654066013e6e78c3ba6fd27fe Reviewed-by: Mitch Curtis Reviewed-by: Thiago Macieira --- src/corelib/tools/qmap.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/corelib/tools/qmap.cpp') diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index ab9b1d23ab..4da9669a39 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -1215,6 +1215,11 @@ void QMapDataBase::freeData(QMapDataBase *d) items from the map, iterators that point to the removed items will become dangling iterators. + \warning Iterators on implicitly shared containers do not work + exactly like STL-iterators. You should avoid copying a container + while iterators are active on that container. For more information, + read \l{Implicit sharing iterator problem}. + \sa QMap::const_iterator, QMutableMapIterator */ @@ -1433,6 +1438,11 @@ void QMapDataBase::freeData(QMapDataBase *d) items from the map, iterators that point to the removed items will become dangling iterators. + \warning Iterators on implicitly shared containers do not work + exactly like STL-iterators. You should avoid copying a container + while iterators are active on that container. For more information, + read \l{Implicit sharing iterator problem}. + \sa QMap::iterator, QMapIterator */ -- cgit v1.2.1