src/gui/graphicsview/qgraphicsview_p.h
branchRCL_3
changeset 14 c0432d11811c
parent 4 3b1da2848fc7
child 30 5dc02b23752f
--- a/src/gui/graphicsview/qgraphicsview_p.h	Wed Apr 21 12:15:23 2010 +0300
+++ b/src/gui/graphicsview/qgraphicsview_p.h	Wed Apr 21 20:15:53 2010 +0300
@@ -183,8 +183,12 @@
         else
             QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
 #else
-        QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers
-                                        | QEventLoop::ExcludeUserInputEvents);
+        // At this point either HIViewSetNeedsDisplay (Carbon) or setNeedsDisplay: YES (Cocoa)
+        // is called, which means there's a pending update request. We want to dispatch it
+        // now because otherwise graphics view updates would require two
+        // round-trips in the event loop before the item is painted.
+        extern void qt_mac_dispatchPendingUpdateRequests(QWidget *);
+        qt_mac_dispatchPendingUpdateRequests(viewport->window());
 #endif
     }