qt5base-lts/tests/auto/corelib
Volker Hilsheimer 944200b5a9 JNI: Reduce amount of temporary QJniEnvironment instantiations
Almost all operations on a QJniObject require a QJniEnvironment,
including the construction and destruction of a QJniObject. Instead of
instantiating a temporary QJniEnvironment object in each call, store the
one from the constructor in the private, and reuse it.

Pass the stored environment through to other functions needing it, and
add a checkAndClearExceptions() wrapper.

Static class members still need their own QJniEnvironment, but we can
reuse the one we have to get both jclass and jmethodID rather than
creating new QJniEnvironments in several wrappers.

As a drive-by, clean up nullptr usage in the test that failed when
shortcutting isSameObject for the trivial cases.

Change-Id: Ibadbd2be8a0ec9ab62daf285608ee7fe0a3c8852
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-18 15:02:22 +02:00
..
animation QSequentialAnimationGroup: extend bindable property unit tests 2023-09-03 18:20:21 +02:00
global is_virtual_base_of: suppress warnings in the test 2023-09-28 09:40:23 +02:00
io moveToTrash/Unix: refactor to use openat()/mkdirat()/renameat() 2023-10-17 19:08:25 -07:00
ipc IPC: Move the legacy key to the QNativeIpcKey 2023-09-17 18:10:18 -07:00
itemmodels QItemSelectionModel: don't warn when destroying the model 2023-09-22 01:42:45 +02:00
kernel JNI: Reduce amount of temporary QJniEnvironment instantiations 2023-10-18 15:02:22 +02:00
mimetypes QMimeType: simplify implementation of filterString 2023-09-13 23:27:44 +02:00
platform Introduce QComObject base class 2023-10-13 21:29:48 +02:00
plugin QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes 2023-08-18 18:00:09 +02:00
serialization Fix renamed and duplicated namespaces in QXmlStreamWriter 2023-09-20 17:16:29 +02:00
text tst_QStringApiSymmetry: add more invalid UTF-8 sequences 2023-10-06 06:59:02 +02:00
thread QtFuture: Prevent whenAll()/whenAny() from creating reference cycles 2023-09-15 13:36:15 +00:00
time Sort out an anomaly in tst_QDateTime::springForward() 2023-10-11 22:06:20 +02:00
tools QSpan: add C++23 c{,r}{begin,end}() 2023-10-12 21:38:54 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00