From 1598ef761a8c3f0c9cccf5318e3de30f6c50880f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 3 Jun 2009 15:18:25 +0200 Subject: 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. --- src/gui/graphicsview/qgraphicsscene.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))); } } + } 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); } -- cgit v0.12