qt6-bb10/tests/auto/corelib
Volker Hilsheimer 27867de8ca Permissions: respect context object's thread and life time
When a context object is provided, then callers expect that the functor
or slot is executed in the thread of the context object. And if the
context object has been destroyed by the time the permission response
is received, the functor shouldn't be called at all.

To implement this, we either have to plumb the call back through a
signal/slot connection and benefit from QObject's infrastructure. This
is not practical here, as we don't have an "engine QObject" that would
emit a signal.

Instead, we can create a QMetaCallEvent explicitly, following what we do
in e.g. QHostInfo, and using a temporary QObject that handles the event
to then call the functor.

Add test coverage.

Pick-to: 6.5
Change-Id: Id878e45b304857304165ab4a7c6aae76fbee46ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 00:21:50 +02:00
..
animation tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
global Short live q20::to_address! 2023-03-31 13:10:12 +01:00
io Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
ipc tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
itemmodels QAbstractItemModel: fix match() with Qt::MatchWildcard 2023-03-09 18:26:59 +01:00
kernel Permissions: respect context object's thread and life time 2023-04-06 00:21:50 +02:00
mimetypes QMimeDatabase: cleanup unittest 2023-03-11 12:39:56 +02:00
platform tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
plugin QPluginLoader: don't instantiante multiple, identical instances 2023-04-05 00:29:16 -07:00
serialization tst_qxmlstream: add non-US-ASCII hasAttribute() checks 2023-04-01 06:26:42 +02:00
text tst_Q(Any)StringView: check conversion from winrt::hstring 2023-03-31 21:41:35 +00:00
thread Deprecate QtFuture::makeReadyFuture() 2023-04-05 13:38:15 +02:00
time Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
tools QMultiHash: fix missing update to m_size 2023-04-04 08:59:32 -03:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00