summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-03-24 13:15:54 +0000
committerShawn Rutledge <shawn.rutledge@qt.io>2020-05-07 13:48:08 +0000
commit3e12951c0b35041920989d6089ddb6c2f5c2d3d1 (patch)
tree6e4d691d4382fbc0b311fdbaf46ccec04ecdfe70 /src/gui/kernel/qguiapplication.cpp
parent5dcaa11cc26fabc4f4f1336681ac19217a9e0e91 (diff)
Remove QScreen::orientationUpdateMask
It simplifies the API and reduces surprise to have rotation working by default. On Android, the manifest specifies which orientations the application has been designed to support; on iOS, it is controlled via the UISupportedInterfaceOrientations property list key. In addition, QWindow::contentOrientation() is another way to give a hint to the window manager, or on iOS to directly control whether the window's rotation is locked or not. Task-number: QTBUG-35427 Task-number: QTBUG-38576 Task-number: QTBUG-44569 Task-number: QTBUG-51012 Task-number: QTBUG-83055 Change-Id: Ieed818497f686399db23813269af322bfdd237af Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 356f9fb11a..8fe06c87e5 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3073,25 +3073,6 @@ void QGuiApplicationPrivate::processScreenOrientationChange(QWindowSystemInterfa
QScreen *s = e->screen.data();
s->d_func()->orientation = e->orientation;
- updateFilteredScreenOrientation(s);
-}
-
-void QGuiApplicationPrivate::updateFilteredScreenOrientation(QScreen *s)
-{
- Qt::ScreenOrientation o = s->d_func()->orientation;
- if (o == Qt::PrimaryOrientation)
- o = s->primaryOrientation();
- o = Qt::ScreenOrientation(o & s->orientationUpdateMask());
- if (o == Qt::PrimaryOrientation)
- return;
- if (o == s->d_func()->filteredOrientation)
- return;
- s->d_func()->filteredOrientation = o;
- reportScreenOrientationChange(s);
-}
-
-void QGuiApplicationPrivate::reportScreenOrientationChange(QScreen *s)
-{
emit s->orientationChanged(s->orientation());
QScreenOrientationChangeEvent event(s, s->orientation());
@@ -3126,9 +3107,6 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
if (s->primaryOrientation() != primaryOrientation)
emit s->primaryOrientationChanged(s->primaryOrientation());
-
- if (s->d_func()->orientation == Qt::PrimaryOrientation)
- updateFilteredScreenOrientation(s);
}
s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);