summaryrefslogtreecommitdiffstats
path: root/qmake/doc/snippets/code
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-06-27 18:29:38 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2023-08-24 07:45:04 +0200
commita7d2855b3c7716467c827f27359259afb5c4cbea (patch)
treeb3130eeed1d0af9ac371715f7c35215472ec1346 /qmake/doc/snippets/code
parent777a1ed19185c594d7f43296e0044e3e354690ca (diff)
invokeMethod: enable passing parameters to overload taking functors
This was missing for a while, and there is nothing fundamentally missing for it to work. With the more recent work around slot objects and invokeMethod in general, it is a good time to add support for this. In this patch, when connecting to a functor, it automatically deduces the overload to call based on the arguments passed to invokeMethod. Sharing code with QObject::connect could be done, but they have a key difference that makes it harder: With signal emissions we throw away trailing arguments that are not used: i.e. `signal(int, int)` can be connected to `slot(int)` or `slot()`. With invokeMethod that's not a thing. So we will need a way to toggle that behavior during resolution. [ChangeLog][QtCore][QMetaObject] Added support for passing parameters to the overload of QMetaObject::invokeMethod that takes a functor. These new overloads must have the return-value passed through qReturnArg(). Change-Id: If4fcbb75515b19e72fab80115c109efa37e6626e Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'qmake/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions