From 42ac179631680a1df9c78d6051a1effc33d0d267 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 9 Sep 2016 10:01:58 -0700 Subject: 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 --- src/corelib/global/qglobal.cpp | 5 +---- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3