summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-09-16 17:11:08 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 08:53:44 +0200
commit09f9c6e1b9b5f0c2e8066444600106d41301bc6b (patch)
tree1e98baf5b0078baacd1d746a12c3026d8b9af0b4 /src/gui
parent1a334f8135d4be7b73b39ac736af0e722c864e83 (diff)
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>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwindow.cpp6
1 files changed, 2 insertions, 4 deletions
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);
}