summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-07-01 09:11:00 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-07-08 08:32:32 +0200
commitac2b15bdd0fa960644b956fbc9a8bf9fe5ff68f5 (patch)
tree209af3df2e36231f25421d7f0cd0028d2930b00c /src/plugins
parent9569836668d4f92ee6664dc2074d9a863fa5cb9f (diff)
Android: [REG] Fix QScreen::physicalSize()
The physical size should be set based on the screen size, not the available geometry. This used to work in Qt 5.3.0 because the screenSize and size of the available geometry was identical on startup, but in Qt 5.3.1 the available geometry is 0x0 until there the metrics are actually available to avoid flickering on startup, so this caused a regression. [ChangeLog][Android] Fixed regression where QScreen::physicalSize() would return 0x0. Change-Id: I6c2ee11205427a88764e129b05ece6d3fbbf4c99 Task-number: QTBUG-39978 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index 09c56f398c..d82487ae9b 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -562,13 +562,13 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
if (!m_androidPlatformIntegration) {
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
desktopHeightPixels,
- qRound(double(desktopWidthPixels) / xdpi * 25.4),
- qRound(double(desktopHeightPixels) / ydpi * 25.4),
+ qRound(double(widthPixels) / xdpi * 25.4),
+ qRound(double(heightPixels) / ydpi * 25.4),
widthPixels,
heightPixels);
} else {
- m_androidPlatformIntegration->setDisplayMetrics(qRound(double(desktopWidthPixels) / xdpi * 25.4),
- qRound(double(desktopHeightPixels) / ydpi * 25.4));
+ m_androidPlatformIntegration->setDisplayMetrics(qRound(double(widthPixels) / xdpi * 25.4),
+ qRound(double(heightPixels) / ydpi * 25.4));
m_androidPlatformIntegration->setDesktopSize(desktopWidthPixels, desktopHeightPixels);
m_androidPlatformIntegration->setScreenSize(widthPixels, heightPixels);
}