src/gui/graphicsview/qgraphicsview_p.h
branchRCL_3
changeset 13 c0432d11811c
parent 4 3b1da2848fc7
equal deleted inserted replaced
12:cc75c76972ee 13:c0432d11811c
   181         if (qt_widget_private(viewport)->paintOnScreen())
   181         if (qt_widget_private(viewport)->paintOnScreen())
   182             QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
   182             QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
   183         else
   183         else
   184             QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
   184             QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
   185 #else
   185 #else
   186         QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers
   186         // At this point either HIViewSetNeedsDisplay (Carbon) or setNeedsDisplay: YES (Cocoa)
   187                                         | QEventLoop::ExcludeUserInputEvents);
   187         // is called, which means there's a pending update request. We want to dispatch it
       
   188         // now because otherwise graphics view updates would require two
       
   189         // round-trips in the event loop before the item is painted.
       
   190         extern void qt_mac_dispatchPendingUpdateRequests(QWidget *);
       
   191         qt_mac_dispatchPendingUpdateRequests(viewport->window());
   188 #endif
   192 #endif
   189     }
   193     }
   190 
   194 
   191     bool updateRect(const QRect &rect);
   195     bool updateRect(const QRect &rect);
   192     bool updateRegion(const QRegion &region);
   196     bool updateRegion(const QRegion &region);