Fix documentation of QAndroidApplication::context

As of Qt 6.7 we no longer return jobjects from that API. The declared
QJniType::Context type (and similar types) is no longer jobject-like,
they are now QJniObject-like.

Task-number: QTBUG-123900
Pick-to: 6.7
Change-Id: I215f84ac37907ae2b7950c40c7287590234e4e35
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
bb10
Volker Hilsheimer 2024-04-19 09:56:48 +02:00
parent 3a36f14157
commit 7d9cedec6a
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ struct Q_CORE_EXPORT QAndroidApplication
{
QT_DECLARE_NATIVE_INTERFACE(QAndroidApplication, 1, QCoreApplication)
#ifdef Q_QDOC
static jobject context();
static QJniObject context();
#else
static QtJniTypes::Context context();
#endif

View File

@ -46,9 +46,9 @@ Q_CONSTINIT static QBasicMutex g_pendingRunnablesMutex;
QT_DEFINE_NATIVE_INTERFACE(QAndroidApplication);
/*!
\fn jobject QNativeInterface::QAndroidApplication::context()
\fn QJniObject QNativeInterface::QAndroidApplication::context()
Returns the Android context as a \c jobject. The context is an \c Activity
Returns the Android context as a \c QJniObject. The context is an \c Activity
if the main activity object is valid. Otherwise, the context is a \c Service.
\since 6.2