summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-27 10:31:53 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-29 07:29:52 +0100
commitd10c34b0cc896c711fce8ae5629e3cc3d74b6452 (patch)
tree0b3a5b451aab87f91eb9ed4414e5f111d7c100a4 /src
parent1459cc8bf664e3a1afeedb972d9f0cb7a3b6b807 (diff)
Fix QScreen orientation not being updated when setting a platform screen
ScreenPrivate::updatePrimaryOrientation() depends on the geometry being set which is calculated by updateHighDpi(). Move the call up. Amends 370289bef68d8505b66cb27150a3f596e23c5ed3. Pick-to: dev 5.15 Task-number: QTBUG-76902 Change-Id: I8188e04ad4a2ef7d414a2b78ecb3dd6c64528fa6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index a1afc1ba14..8e0eb35116 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -118,13 +118,13 @@ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
if (refreshRate < 1.0)
refreshRate = 60.0;
- updatePrimaryOrientation();
+ updateHighDpi();
+
+ updatePrimaryOrientation(); // derived from the geometry
filteredOrientation = orientation;
if (filteredOrientation == Qt::PrimaryOrientation)
filteredOrientation = primaryOrientation;
-
- updateHighDpi();
}