From b206ae41b2f6e9beafe87c7e1223d1502225d844 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Wed, 13 Jul 2011 18:14:39 +0200 Subject: [PATCH] don't detach until the list is going to be modified removeAt() does detach()'ing for us Merge-request: 1285 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 52223d80ec8ba6d579c091efe0e40589a5d2bd67) Change-Id: I78865e19f989d9079c8dee47b8cf1bdf7e5db261 Reviewed-on: http://codereview.qt-project.org/4578 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qlist.h | 1 - 1 file changed, 1 deletion(-) 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::removeAll(const T &_t) template Q_OUTOFLINE_TEMPLATE bool QList::removeOne(const T &_t) { - detachShared(); int index = indexOf(_t); if (index != -1) { removeAt(index);