Models Moving Plan

David Edmundson david at davidedmundson.co.uk
Wed Jan 16 15:07:30 UTC 2013


On Wed, Jan 16, 2013 at 2:59 PM, Aleix Pol <aleixpol at kde.org> wrote:
> On Wed, Jan 16, 2013 at 3:48 PM, David Edmundson
> <david at davidedmundson.co.uk> wrote:
>>
>> Merged!
>>
>> Current task is now to get to a point where we don't depend on any of
>> the old models.
>>
>> An important discussion to have is what we do with the roles.
>>
>> We need to:
>> 1) work out what we actually want/need, and not just copy from tp-yell
>> 2) find a way to do roles properly.
>
>
> Do roles properly? What's the problem?

We have a list model, then 3 proxy models:
 - AccountsTreeProxyModel
 - GroupsTreeProxyModel
 - MessageCountModel (private code.. discussed in active thread)


In the old system we had all the AccountsModel with roles and then
GroupsModel continuing from that

so GroupsModel had

enum Roles {
 GroupNameRole  = AccountsModel::UserRole,
 UserRole
}

but we can't do that with so many proxy models, as we would end up
with people assigning things to the same roles, particularly if
someone subclassed something.

>
>>
>>
>> We need the basic roles, we need roles from the basic contacts list
>> model, both grouping models, and my (as yet unpublished) identity
>> model which tracks ongoing conversations.. .and this all needs to be
>> extensible.
>>
>> I don't know how best to do this
>>
>> _and_ we need to share roles with kpeople.
>
> I don't think this is all that desirable... Maybe it would be interesting to
> know what plans you have in this regard so that we can figure it out, but as
> a start, it seems that it would complicate maintainability for a small
> gain...
>
Well the idea was always that ContactsListModel can be swapped out
with the kpeople model at _runtime_ and everything including grouping
would work.
That was the motivation behind most my refactoring.

Dave


More information about the KDE-Telepathy mailing list