From aa91b0083e14197c332d4284472b9fa8ef179320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 27 Oct 2019 18:25:39 +0100 Subject: [PATCH] qpa: Add note about QScreen taking care of primary screen during removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68 Reviewed-by: Simon Hausmann Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qwindowsysteminterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }