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:
parent
f3fd887de1
commit
aa91b0083e
@ -828,7 +828,8 @@ void QWindowSystemInterface::handleScreenAdded(QPlatformScreen *ps, bool isPrima
|
|||||||
*/
|
*/
|
||||||
void QWindowSystemInterface::handleScreenRemoved(QPlatformScreen *platformScreen)
|
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->screen();
|
||||||
delete platformScreen;
|
delete platformScreen;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user