summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-09-09 10:01:58 -0700
committerJake Petroules <jake.petroules@qt.io>2016-09-18 21:22:33 +0000
commit42ac179631680a1df9c78d6051a1effc33d0d267 (patch)
tree3ef348e0db36d6947a73b00cba742a5338c8b204 /src
parent55ac42dd1327250d73b20e554ad19bbc7670e87e (diff)
Remove special case for Android in QSysInfo::productVersion
Incidentally, this means that the function will no longer include the patch version number on Android, but this is more consistent with other platforms like Apple and Windows anyways. Change-Id: I9996317e73e491b3a139a511efe1384c57b73e0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 34aaec1ef1..e1d56586fa 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2669,7 +2669,7 @@ QString QSysInfo::productType()
*/
QString QSysInfo::productVersion()
{
-#if defined(Q_OS_DARWIN)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_DARWIN)
const auto version = QOperatingSystemVersion::current();
return QString::number(version.majorVersion()) + QLatin1Char('.') + QString::number(version.minorVersion());
#elif defined(Q_OS_WIN)
@@ -2680,9 +2680,6 @@ QString QSysInfo::productVersion()
}
// fall through
-// Android should not fall through to the Unix code
-#elif defined(Q_OS_ANDROID)
- return QJNIObjectPrivate::getStaticObjectField("android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString();
#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
QUnixOSVersion unixOsVersion;
findUnixOsVersion(unixOsVersion);