[Development] invokeMethod() with function pointers

Benjamin TERRIER b.terrier at gmail.com
Sat Jan 14 17:28:01 CET 2017

Hi everyone,

I'm trying to contribute by making QMetaObject::invokeMethod() take function
pointers instead of function names.

I've come up with something that works by looking at the code of
QMetaObject::invokeMethod, QObject::connect and QMetaObject::activate.

However it does not check for parameters and it is implemented as a function
of QObject (because I needed QSlotObjects classes which are not available in
qobjectdef.h). It can handle QObject member functions and functors in which
case  "this" is used to select the event loop (like connect() functions).

I've uploaded my change as a draft on gerrit:

Here is the link to the relevant bug report:

I welcome any comment and feedback.


Benjamin Terrier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170114/4890467b/attachment.html>

More information about the Development mailing list