aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-03-30 14:49:31 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-03-30 14:49:31 +0300
commit4928bd58dbc1cdcf44a7e454e3d4654c3c2016f1 (patch)
tree91659d83ec1ed45f15f9ff81b3f6cd858bfdfcfc
parent484bbac0978eccc9031cbf1bf804a81a6bfb1247 (diff)
parent1545243bc291ffd8a684ab63ef36516d861381b4 (diff)
Merge tag 'v5.15.18-lts' into tqtc/lts-5.15-opensourcev5.15.18-lts-lgpl5.15
Qt 5.15.18-lts release Change-Id: Ic498063b5531228a40cd1091befa327711dacf3b
-rw-r--r--.qmake.conf2
-rw-r--r--src/androidextras/android/qandroidfunctions.cpp33
2 files changed, 29 insertions, 6 deletions
diff --git a/.qmake.conf b/.qmake.conf
index ef828d2..20ba30b 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.15.17
+MODULE_VERSION = 5.15.18
diff --git a/src/androidextras/android/qandroidfunctions.cpp b/src/androidextras/android/qandroidfunctions.cpp
index 8d049fc..9b1e2a2 100644
--- a/src/androidextras/android/qandroidfunctions.cpp
+++ b/src/androidextras/android/qandroidfunctions.cpp
@@ -101,7 +101,11 @@ QT_BEGIN_NAMESPACE
\since 5.3
\fn QAndroidJniObject QtAndroid::androidActivity()
- Returns a handle to this application's main Activity
+ Returns a handle to this application's latest started Activity
+
+ \note When having multiple services or activities, this
+ is not ideal. This limitation is discussed here:
+ \l{https://bugreports.qt.io/browse/QTBUG-86048}{QTBUG-86048}.
\sa QAndroidJniObject, androidService(), androidContext()
*/
@@ -114,7 +118,12 @@ QAndroidJniObject QtAndroid::androidActivity()
\since 5.7
\fn QAndroidJniObject QtAndroid::androidService()
- Returns a handle to this application's main Service
+ Returns a handle to this application's latest started
+ service.
+
+ \note When having multiple services or activities, this
+ is not ideal. This limitation is discussed here:
+ \l{https://bugreports.qt.io/browse/QTBUG-86048}{QTBUG-86048}.
\sa QAndroidJniObject, androidActivity(), androidContext()
*/
@@ -127,9 +136,23 @@ QAndroidJniObject QtAndroid::androidService()
\since 5.8
\fn QAndroidJniObject QtAndroid::androidContext()
- Returns a handle to this application's main Context. Depending on the nature of
- the application the Context object is either the main Service or Activity
- object.
+ Returns a handle to this application's current Context.
+
+ The nature of the returned Context object depends on the state of the
+ application:
+
+ If the activity object is valid, meaning the application is currently
+ running within an activity context, androidContext() will return a handle to
+ that activity.
+
+ If the activity object is not valid, which can occur if the application
+ is running as a service, then androidContext() will return a handle to the
+ service.
+
+ This distinction is important because activities and services have different
+ life-cycle methods for different purposes within an Android
+ application. Activities are typically used for UI interactions with the user,
+ while services run in the background to perform long-running operations.
\sa QAndroidJniObject, androidActivity(), androidService()
*/