summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-10-09 11:40:04 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-10-10 13:37:44 +0200
commitaa0002057835065d6ddb2be4d3c4deeda3276785 (patch)
treebc71903c17d8629ac0e78bdecf014b146c88c203 /src
parent8ddaf5c74150d18f2639aeca495ec40efd8e8add (diff)
Android: Support QSysInfo::productVersion()
Gets the user-readable string for the current running Android version. Task-number: QTBUG-41764 Change-Id: Iefea4a4f5291bfddc99bbf901676ccd33fbc23d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 2696df9e39..ae3e86629e 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2519,7 +2519,9 @@ QString QSysInfo::productVersion()
// fall through
// Android and Blackberry should not fall through to the Unix code
-#elif defined(Q_OS_ANDROID)
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+ return QJNIObjectPrivate::getStaticObjectField("android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString();
+#elif defined(Q_OS_ANDROID) // Q_OS_ANDROID_NO_SDK
// TBD
#elif defined(Q_OS_BLACKBERRY)
deviceinfo_details_t *deviceInfo;