diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-22 15:08:10 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-04-17 12:55:06 +0000 |
commit | 49b4433adf254b81f8b7727fbcf88ce2a48100ba (patch) | |
tree | b7981f3364ee345f9d46131ce50c0bd5d6a6ea8d /src/plugins/platforms/cocoa | |
parent | 8e2a9705669e11a1510bca37121fc27cddd13007 (diff) |
Provide QPlatformWindow::hasPendingUpdateRequest() helper function
So that platform plugins don't need to dive into QWindowPrivate.
Change-Id: Ia2d94b3e9236e4a68857e6afe7af063f1b0d0aeb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_drawing.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_drawing.mm b/src/plugins/platforms/cocoa/qnsview_drawing.mm index 3b72715616..fc5f806cb6 100644 --- a/src/plugins/platforms/cocoa/qnsview_drawing.mm +++ b/src/plugins/platforms/cocoa/qnsview_drawing.mm @@ -115,17 +115,15 @@ } #endif - QWindowPrivate *windowPrivate = qt_window_private(m_platformWindow->window()); - if (m_updateRequested) { - Q_ASSERT(windowPrivate->updateRequestPending); + Q_ASSERT(m_platformWindow->hasPendingUpdateRequest()); m_platformWindow->deliverUpdateRequest(); m_updateRequested = false; } else { m_platformWindow->handleExposeEvent(dirtyRegion); } - if (windowPrivate->updateRequestPending) { + if (m_platformWindow->hasPendingUpdateRequest()) { // A call to QWindow::requestUpdate was issued during event delivery above, // but AppKit will reset the needsDisplay state of the view after completing // the current display cycle, so we need to defer the request to redisplay. |