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>
This commit is contained in:
Tor Arne Vestbø 2019-10-27 18:25:39 +01:00
parent f3fd887de1
commit aa91b0083e

View File

@ -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;
}