Bug 33991 - Should allow Tp::AccountManager::filterAccounts() before FeatureCore is ready
Summary: Should allow Tp::AccountManager::filterAccounts() before FeatureCore is ready
Status: RESOLVED WONTFIX
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-07 06:16 UTC by Xavier Claessens
Modified: 2011-12-29 07:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2011-02-07 06:16:13 UTC
Thanks to all factory helpers, I don't have to worry anymore about readyness of my Tp-qt4 objects. However I still have one place where I have to connect becomeReady signal: to create my Tp::AccountSet.

I see no fundamental reason why Tp::AccountManager::filterAccounts() warnings if FeatureCore is not ready. Maybe the warning could be just dropped?
Comment 1 Xavier Claessens 2011-02-07 06:26:09 UTC
Just to be clear: of course the AccountSet will be empty until the AM gets ready. This is just for lazyness, we could create the AccountSet then wait for accountAdded signal on it once the AM gets ready.
Comment 2 Olli Salli 2011-02-13 03:59:05 UTC
A problem with that is you can't reliably wait for accountAdded. Consider the situation in which there are no accounts - then you end up waiting forever! Hence, you need at least one async roundtrip which doesn't imply waiting for any particular accounts to appear, just the fact that the initial state has been downloaded (which is exactly what becomeReady() finishing means).

Somebody has to call becomeReady anyway to make the accounts appear in the set in the first place. Why not wait for that becomeReady call to finish properly at that? You'll have to do it anyway to handle any possible errors. If the implementation of filterAccounts called becomeReady internally, it'd have to return a PendingOperation to relay these errors (and the fact that the account set with its accounts (or none) is now there) - which I think is undesirable.
Comment 3 Olli Salli 2011-12-29 07:50:42 UTC
Just waiting for accountAdded would hang forever in the case of errors; and I don't want to make AccountSet creation Pending so that the error could be communicated there; hence, WONTFIX.


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.