summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicssceneindex_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-01 15:30:46 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-01 15:42:44 (GMT)
commit2b9294a2b47c4a193ef83be60a07a3e61b8531b4 (patch)
treed7f81c4ec5abc221462ee8bdafa09c24ce8e7359 /src/gui/graphicsview/qgraphicssceneindex_p.h
parentf4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a (diff)
downloadQt-2b9294a2b47c4a193ef83be60a07a3e61b8531b4.zip
Qt-2b9294a2b47c4a193ef83be60a07a3e61b8531b4.tar.gz
Qt-2b9294a2b47c4a193ef83be60a07a3e61b8531b4.tar.bz2
Fixes broken BSP lookup in QGraphicsSceneBspTreeIndex.
The chip demo was unbelievable slow, so I investigated and found out the bsp always returned almost all items in the tree (40 000 in this particular case). It did so because the tree was initialized with an empty sceneRect. The sceneRect was empty due to a lacking signal-slot connection, resulting in QGraphicsSceneBspTreeIndex::updateSceneRect never being invoked. Auto-test included.
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h
index 122d7ae..aabfa79 100644
--- a/src/gui/graphicsview/qgraphicssceneindex_p.h
+++ b/src/gui/graphicsview/qgraphicssceneindex_p.h
@@ -114,7 +114,7 @@ protected:
virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const QVariant &value);
virtual void prepareBoundingRectChange(const QGraphicsItem *item);
- QGraphicsSceneIndex(QObjectPrivate &dd, QGraphicsScene *scene);
+ QGraphicsSceneIndex(QGraphicsSceneIndexPrivate &dd, QGraphicsScene *scene);
friend class QGraphicsScene;
friend class QGraphicsScenePrivate;
@@ -133,6 +133,7 @@ public:
QGraphicsSceneIndexPrivate(QGraphicsScene *scene);
~QGraphicsSceneIndexPrivate();
+ void init();
static bool itemCollidesWithPath(const QGraphicsItem *item, const QPainterPath &path, Qt::ItemSelectionMode mode);
void recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,