[Development] Removing QContactThumbnail class from QtContacts API

cristiano.di-flora at nokia.com cristiano.di-flora at nokia.com
Tue Jan 31 06:44:57 CET 2012


Hi,

>From the old mobility times there has always been confusion in Contacts API between the QContactThumbnail and QContactAvatar.
An excerpt from our docs:
"
The content of the thumbnail detail is static once set. That is, in order to change the thumbnail of a particular contact, the user must modify the detail and update the contact. This is in contrast to the QContactAvatar<http://doc.qt.nokia.com/qtmobility-1.2/qcontactavatar.html> detail, which contains URLs to resources; the actual content of the resource might be changed dynamically by person, group or organization for which the QContact<http://doc.qt.nokia.com/qtmobility-1.2/qcontact.html> is a digital representation. That is, the content of a QContactThumbnail detail is set by the user who has created the contact, but the content of a resource identified by a URL specified in a QContactAvatar<http://doc.qt.nokia.com/qtmobility-1.2/qcontactavatar.html> detail is set by whoever owns the resource which the URL identifies.
"

Now, the reality is that returning a Qimage from QContactAvatar class is not a great idea, since not all the back-ends support real thumbnails, and hence this approach can lead to inefficiency, because:

  1.  The specific image format for a thumbnail depends on several factors which are out of control of the Contacts middleware API
  2.  In back-ends where storing directly some binary blobs might not be possible or desirable, we end-up storing anyway the image to file system

We are now thinking of removing the detail from the API, and give more "power" to the URL based approach adopted in QContactAvatar.
What do the others think? Any objections to killing the QContactThumbnail class in one shot?
Will we be able to use only one single detail type (e.g. QContactAvatar) based on URL and not Qimage?


Ciao!
-Cristiano

________________________________________
Cristiano di Flora, PhD

SW Architect / Technical lead,

MP - Qt Software development

Visiokatu 3
33720, Tampere (FINLAND)

________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120131/d7464c55/attachment.html>


More information about the Development mailing list