qt5base-lts/tests/auto/corelib/kernel/qpermission
Volker Hilsheimer d027b0c816 Constrain QCoreApplication::requestPermission to compatible functors
The 6.5 versions of the overload not taking a context/receiver object
were constrained by requiring a functor to be free function or lambda.
207aae5560 removed that constraint, which
might be source incomaptible if wrapper functions in user code forward
the constraint using Expression SFINAE. Those wrappers would no longer
be removed from the overload set based on the same criteria as the
function they wrap.

We can't constrain the new functions based on the same predicate as
before, as after the simplification we have only one overload with, and
one without context object. But we can still remove overloads for
incompatible functors.

Add the respective scenario to the QPermission test as a compile-time
test.

Found during 6.6 header review.

Pick-to: 6.6
Change-Id: Id21391b4a6b78a29de2f8fa04374f4262e5fafa7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-01 03:30:50 +02:00
..
.gitignore Add minimal QPermission auto-test 2023-01-12 08:48:46 +01:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qpermission.cpp Constrain QCoreApplication::requestPermission to compatible functors 2023-09-01 03:30:50 +02:00