summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-04 15:31:47 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:34:12 (GMT)
commitad92e095ea34dda9d099fae30340a8fbb4c5380a (patch)
treef245499bda45b91cf86fbbbe0f1b6d75918c0d75 /src/gui/graphicsview/qgraphicsscene_p.h
parent98f197d1a11c3dd13959967534b1dba7eea479ea (diff)
downloadQt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.zip
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.gz
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.bz2
Compatibility fix for QGraphicsScene::sceneRectChanged()/sceneRect().
We have to keep the growingItemsBoundingRect up-to-date if there's no scene rect. The only difference now is that sceneRectChanged will not be emitted before entering the event-loop, but the documentation only states it'll be emitted when the scene rect changes, so we consider it harmless. Makes tst_QGraphicsView::sceneRect_growing and tst_QGrahicsScene::sceneRect happy. Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index f4964f2..fd7decf 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -71,6 +71,8 @@
#include <QtGui/qstyle.h>
#include <QtGui/qstyleoption.h>
+static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000;
+
QT_BEGIN_NAMESPACE
class QGraphicsView;
@@ -138,7 +140,7 @@ public:
int indexTimerId;
bool restartIndexTimer;
- void startIndexTimer();
+ void startIndexTimer(int interval = QGRAPHICSSCENE_INDEXTIMER_TIMEOUT);
bool stickyFocus;
bool hasFocus;
@@ -270,6 +272,7 @@ public:
Q_ASSERT(item);
item->d_ptr->dirty = 0;
item->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
+ item->d_ptr->geometryChanged = 0;
item->d_ptr->dirtyChildren = 0;
item->d_ptr->needsRepaint = QRectF();
item->d_ptr->allChildrenDirty = 0;