summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformiconengine.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2024-06-11 16:50:40 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-06-20 06:47:07 +0200
commit457a1c973d68e705f9cf72ac72b19fc26cdb2917 (patch)
tree9b002e2fb01c3695800a917e2c4afcd5379fd549 /src/plugins/platforms/android/qandroidplatformiconengine.cpp
parent37bb00d8507a4def05b5d85a6ef4ea23cca70ab6 (diff)
JNI: pre-declare JNI classes for standard Java types
This avoids that we or users have to declare e.g. String or Uri in several places in Qt. This also prevents problems where multiple declarations (possibly from different headers) cause build errors. As a drive-by, remove some unnecessary type declarations (e.g. UriType, which had the same class string as Uri). To ease the submodule update process, define a preprocessor symbol that submodules can use to conditionally declare the type locally. Once the dependency update is through, the symbol can be removed and submodules can use the declaration from qjnitypes.h. Pick-to: 6.8 Change-Id: I7d96edf644a54246302b5c5cb478e66fa615e73e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformiconengine.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidplatformiconengine.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformiconengine.cpp b/src/plugins/platforms/android/qandroidplatformiconengine.cpp
index faa63dcca13..a88696886dd 100644
--- a/src/plugins/platforms/android/qandroidplatformiconengine.cpp
+++ b/src/plugins/platforms/android/qandroidplatformiconengine.cpp
@@ -28,12 +28,9 @@ Q_DECLARE_JNI_CLASS(FontInfo, "androidx/core/provider/FontsContractCompat$FontIn
// various utility types
Q_DECLARE_JNI_CLASS(List, "java/util/List"); // List is just an Interface
-Q_DECLARE_JNI_CLASS(ArrayList, "java/util/ArrayList");
Q_DECLARE_JNI_CLASS(HashSet, "java/util/HashSet");
-Q_DECLARE_JNI_CLASS(Uri, "android/net/Uri")
Q_DECLARE_JNI_CLASS(CancellationSignal, "android/os/CancellationSignal")
Q_DECLARE_JNI_CLASS(ParcelFileDescriptor, "android/os/ParcelFileDescriptor")
-Q_DECLARE_JNI_CLASS(ContentResolver, "android/content/ContentResolver")
Q_DECLARE_JNI_CLASS(PackageManager, "android/content/pm/PackageManager")
Q_DECLARE_JNI_CLASS(ProviderInfo, "android/content/pm/ProviderInfo")
Q_DECLARE_JNI_CLASS(PackageInfo, "android/content/pm/PackageInfo")