From 09f9c6e1b9b5f0c2e8066444600106d41301bc6b Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Mon, 16 Sep 2013 17:11:08 +0300 Subject: 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 Reviewed-by: Gunnar Sletta --- src/gui/kernel/qwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index deb8613056..12ea4df1c9 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -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); } -- cgit v1.2.3