diff options
| author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-01 10:03:53 +0200 |
|---|---|---|
| committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-01 16:25:19 +0200 |
| commit | a09a8d509a69ed16d8afbe15296b8332cacd6c66 (patch) | |
| tree | 28645b437fd0390d903f753a44ba79626eecb8ac /src/plugins/platforms/android/qandroidplatformintegration.cpp | |
| parent | 4b28152da64f7f23a1bbb810d8cdb7626a5f0b8e (diff) | |
| parent | 83f06da1c6bffff61af78cbe75a0691d53742b53 (diff) | |
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/network/socket/qnativesocketengine_winrt.cpp
src/plugins/platforms/android/androidjniaccessibility.cpp
src/plugins/platforms/windows/qwindowswindow.cpp
Manually adjusted:
mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
to include 9ce697f2d54be6d94381c72af28dda79cbc027d4
Thanks goes to Sergio for the qnx mkspecs adjustments.
Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformintegration.cpp')
| -rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 213b1bb7e61..d6d7d3b1735 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -74,6 +74,8 @@ QT_BEGIN_NAMESPACE int QAndroidPlatformIntegration::m_defaultGeometryWidth = 320; int QAndroidPlatformIntegration::m_defaultGeometryHeight = 455; +int QAndroidPlatformIntegration::m_defaultScreenWidth = 320; +int QAndroidPlatformIntegration::m_defaultScreenHeight = 455; int QAndroidPlatformIntegration::m_defaultPhysicalSizeWidth = 50; int QAndroidPlatformIntegration::m_defaultPhysicalSizeHeight = 71; @@ -121,7 +123,8 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶ m_primaryScreen = new QAndroidPlatformScreen(); screenAdded(m_primaryScreen); m_primaryScreen->setPhysicalSize(QSize(m_defaultPhysicalSizeWidth, m_defaultPhysicalSizeHeight)); - m_primaryScreen->setGeometry(QRect(0, 0, m_defaultGeometryWidth, m_defaultGeometryHeight)); + m_primaryScreen->setAvailableGeometry(QRect(0, 0, m_defaultGeometryWidth, m_defaultGeometryHeight)); + m_primaryScreen->setSize(QSize(m_defaultScreenWidth, m_defaultScreenHeight)); m_mainThread = QThread::currentThread(); QtAndroid::setAndroidPlatformIntegration(this); @@ -312,12 +315,14 @@ QPlatformTheme *QAndroidPlatformIntegration::createPlatformTheme(const QString & return 0; } -void QAndroidPlatformIntegration::setDefaultDisplayMetrics(int gw, int gh, int sw, int sh) +void QAndroidPlatformIntegration::setDefaultDisplayMetrics(int gw, int gh, int sw, int sh, int screenWidth, int screenHeight) { m_defaultGeometryWidth = gw; m_defaultGeometryHeight = gh; m_defaultPhysicalSizeWidth = sw; m_defaultPhysicalSizeHeight = sh; + m_defaultScreenWidth = screenWidth; + m_defaultScreenHeight = screenHeight; } void QAndroidPlatformIntegration::setDefaultDesktopSize(int gw, int gh) @@ -345,7 +350,7 @@ QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const void QAndroidPlatformIntegration::setDesktopSize(int width, int height) { if (m_primaryScreen) - QMetaObject::invokeMethod(m_primaryScreen, "setGeometry", Qt::AutoConnection, Q_ARG(QRect, QRect(0,0,width, height))); + QMetaObject::invokeMethod(m_primaryScreen, "setAvailableGeometry", Qt::AutoConnection, Q_ARG(QRect, QRect(0,0,width, height))); } void QAndroidPlatformIntegration::setDisplayMetrics(int width, int height) @@ -354,4 +359,10 @@ void QAndroidPlatformIntegration::setDisplayMetrics(int width, int height) QMetaObject::invokeMethod(m_primaryScreen, "setPhysicalSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height))); } +void QAndroidPlatformIntegration::setScreenSize(int width, int height) +{ + if (m_primaryScreen) + QMetaObject::invokeMethod(m_primaryScreen, "setSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height))); +} + QT_END_NAMESPACE |
