summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-10-06 14:26:46 +0300
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-12-29 17:30:06 +0100
commitface2023e41723e48f044977ebf76577d2313992 (patch)
treec822849971e20f6400edd5073613e932179826d8 /src/client/qwaylanddisplay.cpp
parentf4bfdc5eed9f153f02f8370dc8bfa4aaea6de38c (diff)
Make use of the new QPlatformIntegration::destroyScreen
Task-number: QTBUG-41141 Change-Id: I0bd789cc1090f7e0e7615b47c33a4e4179677398 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 023050326..a4d13db71 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -168,7 +168,9 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
QWaylandDisplay::~QWaylandDisplay(void)
{
- qDeleteAll(mScreens);
+ foreach (QWaylandScreen *screen, mScreens) {
+ mWaylandIntegration->destroyScreen(screen);
+ }
mScreens.clear();
delete mDndSelectionHandler.take();
mEventThread->quit();
@@ -291,8 +293,8 @@ void QWaylandDisplay::registry_global_remove(uint32_t id)
if (global.interface == QStringLiteral("wl_output")) {
foreach (QWaylandScreen *screen, mScreens) {
if (screen->outputId() == id) {
- delete screen;
mScreens.removeOne(screen);
+ mWaylandIntegration->destroyScreen(screen);
break;
}
}