best place for a helper function

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Fri Mar 1 12:05:08 UTC 2013


On 01/03/13 12:21, Martin Klapetek wrote:
> What you could do is to put it inside KTp::Contact and then reimplement
> avatar() and check if the contact is offline and if so, return the
> greyed avatar. Makes things simpler and you don't have to change any
> other code.

It looks like the right place to me, but I don't remember a
{Tp/KTp}::Contact::avatar() method to reimplement, I think that we have
just a "QString Tp::Contact::avatarToken()" that returns just a string.
We could add a KTp::contact::avatar() that does the magic though, but
I'm not sure if we want it grayed wherever it is used, so I'd suggest to
add a "bool KTp::Contact::avatar(grayIfUnavailable = false)".


Cheers,
 Daniele



More information about the KDE-Telepathy mailing list