]> git.pld-linux.org Git - packages/qt4.git/blob - qt4-git.patch
- rel 3; segfault fix
[packages/qt4.git] / qt4-git.patch
1 commit 705880f0045ac39140f980d69aec68869213e379
2 Author: Alexis Menard <alexis.menard@nokia.com>
3 Date:   Thu Nov 26 13:47:34 2009 +0100
4
5     Fix a crash in KDE/Plasma with QGraphicsView. TopLevel list of items
6     was corrupted.
7     
8     This nasty bug was triggered when the index sort the top level list of
9     items. We forgot to set the flag topLevelSequentialOrdering to false
10     so when an item was removed from the top level list it was using the
11     sibling index which can be not valid anymore since the list is not
12     sorted by sequential order. So it let some dangling pointers in the
13     list which make processDirtyItemRecursive crash the next paint event.
14     
15     Reviewed-by:bnilsen
16     Reviewed-by:andreas
17
18 diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
19 index a1d0496..69e4d5b 100644
20 --- a/src/gui/graphicsview/qgraphicsscene_p.h
21 +++ b/src/gui/graphicsview/qgraphicsscene_p.h
22 @@ -78,7 +78,7 @@ class QGraphicsSceneIndex;
23  class QGraphicsView;
24  class QGraphicsWidget;
25  
26 -class QGraphicsScenePrivate : public QObjectPrivate
27 +class Q_AUTOTEST_EXPORT QGraphicsScenePrivate : public QObjectPrivate
28  {
29      Q_DECLARE_PUBLIC(QGraphicsScene)
30  public:
31 @@ -265,6 +265,7 @@ public:
32      {
33          if (needSortTopLevelItems) {
34              qSort(topLevelItems.begin(), topLevelItems.end(), qt_notclosestLeaf);
35 +            topLevelSequentialOrdering = false;
36              needSortTopLevelItems = false;
37          }
38      }
39
This page took 0.064472 seconds and 3 git commands to generate.