qt6-bb10/tests/auto/corelib/kernel
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
..
qapplicationstatic
qcoreapplication
qdeadlinetimer
qelapsedtimer
qeventdispatcher QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qeventloop
qjnienvironment
qjniobject
qjnitypes
qmath
qmetacontainer
qmetaenum
qmetamethod
qmetaobject
qmetaobjectbuilder moc: Record types of enumerations 2023-03-31 17:42:58 +02:00
qmetaproperty
qmetatype QMetaType: Provide underlyingType for enums 2023-03-28 10:59:53 +02:00
qmimedata
qobject
qpermission Permissions: respect context object's thread and life time 2023-04-06 00:21:50 +02:00
qpointer
qproperty
qsignalblocker
qsignalmapper
qsocketnotifier
qtimer Fix QTimer::crossThreadSingleShotToFunctor test 2023-03-30 19:17:25 +02:00
qtranslator
qvariant tst_QVariant: add a test contrasting Qt 5/6 isNull behavior 2023-03-24 06:40:27 +01:00
qwineventnotifier
qwinregistrykey
CMakeLists.txt