When calling invokeMethod, pass the function name without parentheses.
Change-Id: I5a5a28242a98bf76347450b799c1d51c293f9ef4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
{
// Look for and call the accessible[actionName]Action() function on the item.
// This allows for overriding the default action handling.
- const QByteArray functionName = "accessible" + actionName.toLatin1() + "Action()";
- if (object()->metaObject()->indexOfMethod(functionName) != -1) {
- QMetaObject::invokeMethod(object(), functionName, Q_ARG(QString, actionName));
+ const QByteArray functionName = "accessible" + actionName.toLatin1() + "Action";
+ if (object()->metaObject()->indexOfMethod(functionName + "()") != -1) {
+ QMetaObject::invokeMethod(object(), functionName);
return;
}