Proper avatar fetching in contact list
Review Request #101135 - Created April 15, 2011 and submitted
This patch implements proper avatar fetching in the contact list, leaving out a FIXME. The additional class is library-ready, as it needs to be used in other places than the CL. It uses KIO to be able to fetch (asynchronously) the file from every protocol KIO supports (so even http, ftp and stuff)
Needs testing, as I couldn't test myself!
Seems pretty damn good. Few very minor comments:
Should we pass the parent widget argument to KFileDialog::getImageOpenUrl so that the dialog loads next to the correct window. Also we should set a caption such as "Select an image to use an an avatar".
We should check (or Q_ASSERT) that the qobject_cast was successful before using fetchJob.
I know this isn't your code, but should this be here at all? I would have expected userAccountIconButton to already have code to change upon the account->avatarChanged() signal, which means we don't need to do it ourselves here too.