[Bug 31195] Implement models

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 25 14:26:23 CET 2011


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

--- Comment #16 from Martin Klapetek <martin.klapetek at gmail.com> 2011-03-25 06:26:21 PDT ---
(In reply to comment #15)
> 
> Keep in mind that this model is not used just by KDE, so there might be more
> use cases than just the KDE ones. For instance, the accounts model can be used
> (the toplevel items) in the kcm account for example, and there you really want
> to display accounts that are offline and/or disabled.
> 
> Also, such accounts can be easily filtered out by adding a simple
> sortfilterproxymodel on top of the existing model. I see really no point in
> changing the original models to achieve that.

True. So we reverted the filtering back and moved it to our proxy filter model,
which is not part of the repo as it is very application specific and thus not
useful for this project (but if you want, I can add it...).

> 
> > 3) There is one new method, AccountsModel::accountForContactIndex(const
> > QModelIndex& index). This returns the account where the contact at index index
> > belongs. This is needed when requesting text/audio/video channel, as you need
> > to call this on an account object with the contact as a parameter.
> 
> This looks fine (the idea, haven't checked the implementation though).

We added another one, AccountsModel::contactForIndex(const QModelIndex& index),
which returns Tp::ContactPtr, so that it can be easily retrieved for the
purposes of context menu/contact properties popup in the view.

Again, here's the repo: https://github.com/mck182/telepathy-qt4-yell

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



More information about the telepathy-bugs mailing list