path: root/tests/manual/qscreen/propertywatcher.cpp
diff options
authorAleix Pol <>2014-06-25 15:09:09 +0200
committerFrederik Gladhorn <>2014-07-02 23:14:19 +0200
commit5f504166203d9562ef5b41a0f18ae191aa34ee63 (patch)
treea9e528110a7fd16a06e07b94659f70a33be81e4e /tests/manual/qscreen/propertywatcher.cpp
parent0541516907da117c391b6c8d9820209673fcd9cd (diff)
Make it possible to know when a screen is being removed
So far, we had to listen to the QObject::destroyed signal from the QScreen class to figure out whether a screen was removed. Often, this is already too late, given that most of the QWindows have been moved by then and we don't get to react before the windows are being set to the primary screen. This patch introduces a new signal that will notify about a screen removal before the screen is started to be destroyed, so that the application gets to decide what to do with the screens before Qt decides to move things around. [ChangeLog][QtGui][QGuiApplication] Added QGuiApplication::screenRemoved signal to inform that a screen has been removed, before Qt reacts to it. Change-Id: I99304179f4d345cae581a87baac6cff7b8773dea Reviewed-by: Shawn Rutledge <>
Diffstat (limited to 'tests/manual/qscreen/propertywatcher.cpp')
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/manual/qscreen/propertywatcher.cpp b/tests/manual/qscreen/propertywatcher.cpp
index 2213f4ac1d..9e34c69799 100644
--- a/tests/manual/qscreen/propertywatcher.cpp
+++ b/tests/manual/qscreen/propertywatcher.cpp
@@ -82,6 +82,5 @@ void PropertyWatcher::updateAllFields()
void PropertyWatcher::subjectDestroyed()
- hide();
- deleteLater();
+ qDebug("screen destroyed");