From 5f504166203d9562ef5b41a0f18ae191aa34ee63 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 25 Jun 2014 15:09:09 +0200 Subject: 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 --- src/gui/kernel/qguiapplication.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication.h') diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h index 1b1e1dabff..6e751e1275 100644 --- a/src/gui/kernel/qguiapplication.h +++ b/src/gui/kernel/qguiapplication.h @@ -165,6 +165,7 @@ public: Q_SIGNALS: void fontDatabaseChanged(); void screenAdded(QScreen *screen); + void screenRemoved(QScreen *screen); void lastWindowClosed(); void focusObjectChanged(QObject *focusObject); void focusWindowChanged(QWindow *focusWindow); -- cgit v1.2.3