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/gui/kernel/qplatformwindow.cpp | |
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/gui/kernel/qplatformwindow.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index bc1aeb8217..9fe68bd564 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -749,6 +749,16 @@ void QPlatformWindow::requestUpdate() } /*! + Returns true if the window has a pending update request. + + \sa requestUpdate(), deliverUpdateRequest() +*/ +bool QPlatformWindow::hasPendingUpdateRequest() const +{ + return qt_window_private(window())->updateRequestPending; +} + +/*! Delivers an QEvent::UpdateRequest event to the window. QPlatformWindow subclasses can re-implement this function to @@ -757,6 +767,8 @@ void QPlatformWindow::requestUpdate() */ void QPlatformWindow::deliverUpdateRequest() { + Q_ASSERT(hasPendingUpdateRequest()); + QWindow *w = window(); QWindowPrivate *wp = qt_window_private(w); wp->updateRequestPending = false; |