summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <[email protected]>2023-03-29 11:50:07 +0200
committerVolker Hilsheimer <[email protected]>2023-04-06 00:21:50 +0200
commit27867de8ca257eb8aa1e02e04b35c0efd3929584 (patch)
tree204cf78749c69219b9f1593adcefb27bd97bfc8f /src/plugins/sqldrivers/mysql/qsql_mysql.cpp
parentef27cc126c38ff14360bebeeb3100671df9e4cf4 (diff)
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 <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'src/plugins/sqldrivers/mysql/qsql_mysql.cpp')
0 files changed, 0 insertions, 0 deletions