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?
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.
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.
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.