Proper avatar fetching in contact list

Review Request #101135 - Created April 15, 2011 and submitted

Dario Freddi
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!
David Edmundson
Seems pretty damn good.

Few very minor comments:
main-widget.cpp (Diff revision 1)
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".

  1. True, I totally copied and pasted that part. Will fix that before pushing.
main-widget.cpp (Diff revision 1)
We should check (or Q_ASSERT) that the qobject_cast was successful before using fetchJob.
  1. Q_ASSERT - that cast should always succeed.
main-widget.cpp (Diff revision 1)
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.
  1. I will check that and eventually submit a separate review request later today
Commit Hook
This review has been submitted with commit e057ef0bd2167fdc76691839503e578d4df3b971 by Dario Freddi.