Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1737

Concept of SelfContact always assumes that contact can be deleted and the localId can be set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 1.2.0
    • Contacts
    • None

      The QtM Contacts API assumes that if the engine supports the concept of a "selfcontact" it also supports deleting/removing that contact as well as letting the client decide which contact with which localId is to be the selfcontact.

      But these assumption cannot be fulfilled with the qtcontacts-tracker engine. The tracker database contains a selfcontact from the very beginning, which also can/should not be deleted. And as the localId is now bound to the internal database index (for performance reasons), the localId of the selfcontact can also not be changed.

      Problem:
      There is no way to advertise that "limited" support for a self-contact. The API dox only defines the feature flag QContactManager::SelfContact as:
      "QContactManager::SelfContact The manager supports the concept of saving a contact which represents the current user"

      And so e.g. the test tst_QContactManager::selfContactId() (**) will fail for qtcontacts-tracker, as it just sees the flag QContactManager::SelfContact and assumes it can change the localId or delete the selfcontact as it likes. From the code there it seems the "maemo5" engine has the same problem.

      Solution:
      no backwards compatible idea yet, sorry

      I also wonder if this API where the client can select the selfcontact out of the already stored contacts is perfect yet. What are the use cases for that? Accessing a shared database where the user only afterwards can tell "I am that one"? Why would the user later switch to another contact and say "Now I am this"?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes