diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qplatformwindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qplatformwindow.h | 1 |
2 files changed, 13 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; diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index 2fe8ad94e6..2b353959c7 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -144,6 +144,7 @@ public: const QRect &initialGeometry, int defaultWidth, int defaultHeight); virtual void requestUpdate(); + bool hasPendingUpdateRequest() const; virtual void deliverUpdateRequest(); // Window property accessors. Platform plugins should use these |