[Bug 35341] Bind Connection.ContactBlocking

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 25 12:44:56 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35341

--- Comment #5 from Olli Salli <ollisal at gmail.com> 2011-03-25 04:44:55 PDT ---
Oh crap. I ignored the WIP commit because I thought you said you amended the
earlier commits to fix issues :) I see you already spotted the need for the
async contact buildup and the changes from the latest spec. Some things I spot
in the WIP commit though:

In gotContactBlockingBlockedContacts:

+    Q_ASSERT(!cachedBlockedContacts.isEmpty());

Surely there can be no blocked contacts?

-    uint contactBlockingCaps = 
qdbus_cast<uint>(props[QLatin1String("ContactBlockingCapabilities")]);
-    canReportAbusive =  contactBlockingCaps &
ContactBlockingCapabilityCanReportAbusive;
+    uint contactBlockingCaps =  qdbus_cast<uint>(
+            props[QLatin1String("ContactBlockingCapabilities")]);

You could use requestPropertyContactBlockingCapabilities instead of the
allProperties method as you only need a single property. In addition to being
marginally more efficient, that way you can catch the error of the property not
being correctly implemented (using All it's just missing from the map and
you'll get a default-constructed value from qdbus_cast).

Most of the issues from my previous comment remain, though.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list