Summary: | Implement an intuitive replacement for synchronous D-Bus property getters | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Will Thompson <will> |
Component: | tp-qt | Assignee: | Olli Salli <ollisal> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | ollisal |
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://git.collabora.co.uk/?p=user/bari/telepathy-qt4.git;a=shortlog;h=refs/heads/async-properties | ||
Whiteboard: | patch | ||
i915 platform: | i915 features: |
Description
Will Thompson
2010-09-09 02:58:11 UTC
I don't think it's worthwhile adding any logic / parameter to the proxy generator for this, as I think we're going to stop generating them for both old and new classes RSN in the API/ABI break. Another thing we should probably do, though, is: implement a PendingVariantMap *properties() and PendingVariant *property(name) (or maybe even Pending<T1> *property1(), Pending<T2> *property2()), etc, which would do Properties::Get(All), on the AbstractInterface subclasses. This would also make internal tp-qt4 code mode readable, as it wouldn't have to have verbose property getting code and possibly even the hardcoded property name strings. Here's my branch with the fixes. It generates requestPropertyFoo() and setPropertyFoo() for every DBus properties. If there are properties it also generates a requestAllProperties() returning a PendingVariantMap (new type that is more convenient to use than a PendingVariant in this case). I also added a new test to test DBus properties and modified the existing ones to avoid the deprecated getters. The last patch, not supposed to be merged now, removes the deprecates property accessors. Sadly it was not possible to add a PendingValue<T> as you cannot use Q_OBJECT with templates :( Merged to git master with some additional fixes. Will be in 0.3.14. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.