diff options
| author | Soheil Armin <soheil.armin@qt.io> | 2024-08-07 14:06:12 +0300 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-09-23 11:40:44 +0000 |
| commit | 505ee95fda8023fe891c099659dc13115bce4a0b (patch) | |
| tree | 6df77e00a0d25fe53e596115f231eaa3392416a2 /src/gui/opengl/qopenglprogrambinarycache.cpp | |
| parent | 72c6fcafdd7bff4d5b954055787a78454218ebb6 (diff) | |
Android: Fix QtAbstractItemModel proxy threading problem
This change sets the thread affinity of the
QAndroidItemModelProxy instance to the Qt main thread,
enabling its APIs to be called from both the Qt main thread
and Android threads. Synchronization between threads is
ensured by using the newly introduced
QAndroidItemModelProxy::safeCall(), which utilizes
QMetaObject::invokeMethod() with the appropriate
connection type based on the calling thread.
For void functions, Qt::AutoConnection can be used.
Functions returning values will either use a
Qt::DirectConnection if invoked from the same thread as
the QAndroidItemModelProxy instance, or a
Qt::BlockingQueuedConnection if called from a different
thread.
Fixes: QTBUG-127701
Change-Id: I214bc43d20d8bdf301fc97920493415d503d26d8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6c30a60a42800dd5d732d2c7018d87e8f3a9c6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1f0cf1e6e5625587caec3951c9a439ac0b3e3cfb)
Diffstat (limited to 'src/gui/opengl/qopenglprogrambinarycache.cpp')
0 files changed, 0 insertions, 0 deletions
