Don't automatically create a platform window on content orientation change
The platform window creation is policy is such that native resources are created only when necessary. Since QWindow already tracks contentOrientation, there is no reason to implicitly create a platform window when a content orientation change is reported. This makes content orientation follow the same convention used by windowState. Change-Id: Ic9920360791e3e5b2abbc36df631a3e53931835b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>bb10
parent
1a334f8135
commit
09f9c6e1b9
|
|
@ -956,11 +956,9 @@ void QWindow::reportContentOrientationChange(Qt::ScreenOrientation orientation)
|
|||
Q_D(QWindow);
|
||||
if (d->contentOrientation == orientation)
|
||||
return;
|
||||
if (!d->platformWindow)
|
||||
create();
|
||||
Q_ASSERT(d->platformWindow);
|
||||
if (d->platformWindow)
|
||||
d->platformWindow->handleContentOrientationChange(orientation);
|
||||
d->contentOrientation = orientation;
|
||||
d->platformWindow->handleContentOrientationChange(orientation);
|
||||
emit contentOrientationChanged(orientation);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue