Blame SOURCES/qt-everywhere-opensource-src-4.8.0-QTBUG-22037.patch

462c49
diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037 qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h
462c49
--- qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037	2011-10-03 22:44:32.000000000 -0500
462c49
+++ qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h	2011-10-15 14:25:52.238694974 -0500
462c49
@@ -769,26 +769,18 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::clea
462c49
 template <typename T>
462c49
 Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
462c49
 {
462c49
-    int index = indexOf(_t);
462c49
-    if (index == -1)
462c49
-        return 0;
462c49
-
462c49
+    detachShared();
462c49
     const T t = _t;
462c49
-    detach();
462c49
-
462c49
-    Node *i = reinterpret_cast<Node *>(p.at(index));
462c49
-    Node *e = reinterpret_cast<Node *>(p.end());
462c49
-    Node *n = i;
462c49
-    node_destruct(i);
462c49
-    while (++i != e) {
462c49
-        if (i->t() == t)
462c49
-            node_destruct(i);
462c49
-        else
462c49
-            *n++ = *i;
462c49
-    }
462c49
-
462c49
-    int removedCount = e - n;
462c49
-    d->end -= removedCount;
462c49
+    int removedCount=0, i=0;
462c49
+    Node *n;
462c49
+    while (i < p.size())
462c49
+        if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
462c49
+            node_destruct(n);
462c49
+            p.remove(i);
462c49
+            ++removedCount;
462c49
+        } else {
462c49
+            ++i;
462c49
+        }
462c49
     return removedCount;
462c49
 }
462c49