diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-21 13:06:59 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-21 13:25:29 +0100 |
commit | 27fb50ac724020c32a6d5ee1b00b0648f689e0d1 (patch) | |
tree | b1e1ecfeaff7893ff277efdd59050ccaacc431a7 | |
parent | 63f1fb2dfeabc01f14a1766a2277ece4d338b0e6 (diff) |
Fix doAction with custom functions.
When calling invokeMethod, pass the function name without parentheses.
Change-Id: I5a5a28242a98bf76347450b799c1d51c293f9ef4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
-rw-r--r-- | src/plugins/accessible/shared/qqmlaccessible.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/accessible/shared/qqmlaccessible.cpp b/src/plugins/accessible/shared/qqmlaccessible.cpp index 70c6b90efe..54d0c06171 100644 --- a/src/plugins/accessible/shared/qqmlaccessible.cpp +++ b/src/plugins/accessible/shared/qqmlaccessible.cpp @@ -158,9 +158,9 @@ void QQmlAccessible::doAction(const QString &actionName) { // 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; } |