telepathy-qt: Tools/qt-svc-gen: Fixed condition in adaptor methods generation.
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Wed May 6 01:10:28 PDT 2015
Module: telepathy-qt
Branch: master
Commit: a7941ac1de8ca9f3599d539646638d0c3c82b7d2
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=a7941ac1de8ca9f3599d539646638d0c3c82b7d2
Author: Alexandr Akulich <akulichalexander at gmail.com>
Date: Thu Apr 23 18:59:08 2015 +0500
Tools/qt-svc-gen: Fixed condition in adaptor methods generation.
The condition was looks like
if (!adaptee()->metaObject()->indexOfMethod("method()") == -1) {
dbusConnection().send(dbusMessage.createErrorReply(NOT_IMPLEMENTED)));
return;
}
The logical inversion at the start turns zero index into 1 and all other
indices into 0, thus the condition is always false.
Bug: #86312.
Reviewed-by: David Edmundson
---
tools/qt-svc-gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/qt-svc-gen.py b/tools/qt-svc-gen.py
index 58b77bb..52f6155 100644
--- a/tools/qt-svc-gen.py
+++ b/tools/qt-svc-gen.py
@@ -603,7 +603,7 @@ void %(ifacename)s::%(settername)s(const %(type)s &newValue)
self.b("""
%(rettype)s %(ifacename)s::%(name)s(%(params)s)
{
- if (!adaptee()->metaObject()->indexOfMethod("%(adaptee_name)s(%(normalized_adaptee_params)s)") == -1) {
+ if (adaptee()->metaObject()->indexOfMethod("%(adaptee_name)s(%(normalized_adaptee_params)s)") < 0) {
dbusConnection().send(dbusMessage.createErrorReply(TP_QT_ERROR_NOT_IMPLEMENTED, QLatin1String("Not implemented")));
""" % {'rettype': rettype,
'ifacename': ifacename,
More information about the telepathy-commits
mailing list