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

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