summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-03-22 12:54:35 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-03-29 10:01:41 +0000
commitbff59f87ba11cac1dfa710f021522372de7a776f (patch)
tree9fa99636bf623d631abd5f9a0fef073c150b7fe0 /src/gui/kernel/qwindow.cpp
parentdb7c644cd634cce3b309fb63978f466456e0f559 (diff)
Move delivery of update requests into QPlatformWindow
Having deliverUpdateRequest in QWindowPrivate was a bit awkward and asymmetric to the QPlatformWindow::requestUpdate() API. Keeping them together follows the existing pattern of plumbing things through the platform window, and also allows us to move away from platform plugins relying on QWindowPrivate implementation details. Change-Id: Ib131ccdd1c2bdd6ff1c8d95facbc3f6f88a1abcf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index da22d237ac..0a41196b5b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2333,7 +2333,8 @@ bool QWindow::event(QEvent *ev)
if (static_cast<QTimerEvent *>(ev)->timerId() == d->updateTimer) {
killTimer(d->updateTimer);
d->updateTimer = 0;
- d->deliverUpdateRequest();
+ if (d->platformWindow)
+ d->platformWindow->deliverUpdateRequest();
} else {
QObject::event(ev);
}
@@ -2357,14 +2358,6 @@ bool QWindow::event(QEvent *ev)
return true;
}
-void QWindowPrivate::deliverUpdateRequest()
-{
- Q_Q(QWindow);
- updateRequestPending = false;
- QEvent request(QEvent::UpdateRequest);
- QCoreApplication::sendEvent(q, &request);
-}
-
/*!
Schedules a QEvent::UpdateRequest event to be delivered to this window.