Your IBusAction
is a pointer-to-function type. This is not compatible with pointer-to-member function.
When you call a member function (like your UserModule::create
function), it needs an extra ("invisible") parameter: the instance the function gets called on (the this
pointer).
You have essentially three options:
Change
IBusAction
to be a pointer-to-member-function-of-UserModule
. You're restricted to that class's functions with this though.typedef QByteArray* (UserModule::*IBusAction)(IBus * , ProxyRequest *);
Make the functions
static
(this changes the semantics of your code)- Use free-standing functions (top-level, not members of a class) instead of member functions.