diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-03-14 00:36:34 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-03-19 13:08:25 +0000 |
commit | 01e1df90a7debd333314720fdd5cf6cd9964d796 (patch) | |
tree | 1a5c9e7b6921630d99f52fa46072da20752a6350 /src/gui/kernel/qplatformscreen.cpp | |
parent | dc753374478d751c7c124030429e90d058934f9f (diff) |
Move screen maintenance functions from QPlatformIntegration to QWSI
QWindowSystemInterface is the de facto API for any plumbing going from
the platform plugin to QtGui. Having the functions as protected members
of QPlatformIntegration was idiosyncratic, and resulted in awkward
workarounds to be able to call the functions from outside of the
QPlatformIntegration subclass.
The functions in QPlatformIntegration have been left in, but deprecated
so that platform plugins outside of qtbase have a chance to move over to
the new QWSI API before they are removed.
Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformscreen.cpp')
-rw-r--r-- | src/gui/kernel/qplatformscreen.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index b7b312e89e..21ae75ba8f 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -61,8 +61,11 @@ QPlatformScreen::~QPlatformScreen() { Q_D(QPlatformScreen); if (d->screen) { - qWarning("Manually deleting a QPlatformScreen. Call QPlatformIntegration::destroyScreen instead."); + qWarning("Manually deleting a QPlatformScreen. Call QWindowSystemInterface::handleScreenRemoved instead."); +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QGuiApplicationPrivate::platformIntegration()->removeScreen(d->screen); +QT_WARNING_POP delete d->screen; } } |