diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-03 13:18:25 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:32:45 (GMT) |
commit | 1598ef761a8c3f0c9cccf5318e3de30f6c50880f (patch) | |
tree | fcb1b59170b29701d758283b9e93b9e389f158d2 /src | |
parent | 33473417a73cafa0c0d9283c00b1e716becba0e1 (diff) | |
download | Qt-1598ef761a8c3f0c9cccf5318e3de30f6c50880f.zip Qt-1598ef761a8c3f0c9cccf5318e3de30f6c50880f.tar.gz Qt-1598ef761a8c3f0c9cccf5318e3de30f6c50880f.tar.bz2 |
Compatibility fix: Updates made on the scene must be processed with a queued connection
This connection was queued in the views before, but we don't do that
anymore, instead we re-use the _q_emitUpdated slot and process
pending updates on the views there.
Makes tst_QGraphicsView::viewportUpdateMode happy again.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index ec0e87b..8641fe2 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -614,6 +614,10 @@ void QGraphicsScenePrivate::_q_emitUpdated() views.at(i), SLOT(updateScene(QList<QRectF>))); } } + } else { + for (int i = 0; i < views.size(); ++i) + views.at(i)->d_func()->processPendingUpdates(); + return; } // Notify the changes to anybody interested. @@ -3721,7 +3725,7 @@ void QGraphicsScene::update(const QRectF &rect) } } - if (!directUpdates && !d->calledEmitUpdated) { + if (!d->calledEmitUpdated) { d->calledEmitUpdated = true; QMetaObject::invokeMethod(this, "_q_emitUpdated", Qt::QueuedConnection); } |