summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-27 18:25:39 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-29 11:07:50 +0000
commitaa91b0083e14197c332d4284472b9fa8ef179320 (patch)
tree4a724f0755ee51be4f611b5aa5b199a00d9bc166 /src/gui/kernel
parentf3fd887de1c9cf4717bf475e5bb1ddf79ac6521e (diff)
qpa: Add note about QScreen taking care of primary screen during removal
Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 4f1056e906..ba04f8701d 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -828,7 +828,8 @@ void QWindowSystemInterface::handleScreenAdded(QPlatformScreen *ps, bool isPrima
*/
void QWindowSystemInterface::handleScreenRemoved(QPlatformScreen *platformScreen)
{
- // Important to keep this order since the QSceen doesn't own the platform screen
+ // Important to keep this order since the QSceen doesn't own the platform screen.
+ // The QScreen destructor will take care changing the primary screen, so no need here.
delete platformScreen->screen();
delete platformScreen;
}