diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2011-07-13 18:14:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-12 16:03:47 +0200 |
commit | b206ae41b2f6e9beafe87c7e1223d1502225d844 (patch) | |
tree | c0023dc34da3c39a0558be631cbb597d6dbd98db | |
parent | 9f865df5d1bd98b8fd43e72c1d0c21f42ae3afec (diff) |
don't detach until the list is going to be modified
removeAt() does detach()'ing for us
Merge-request: 1285
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 52223d80ec8ba6d579c091efe0e40589a5d2bd67)
Change-Id: I78865e19f989d9079c8dee47b8cf1bdf7e5db261
Reviewed-on: http://codereview.qt-project.org/4578
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r-- | src/corelib/tools/qlist.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 5c9845539a..a215cc689a 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -776,7 +776,6 @@ Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t) template <typename T> Q_OUTOFLINE_TEMPLATE bool QList<T>::removeOne(const T &_t) { - detachShared(); int index = indexOf(_t); if (index != -1) { removeAt(index); |