Hi Michal,

Your application is writing to the unrpivileged contacts DB. This DB is "read 
only", as jolla-contacts sync the (privileged) DB to this one, without syncing 
back. That's why you see your contact, but it do not appear in jolla-contacts.

Running with privileged group, and access to the privileged DB should fix this 
as Andrey said.

Regards,
Lucien

----- Mail original -----
> De: "Andrey Kozhevnikov" <coderusin...@gmail.com>
> À: "Sailfish OS Developers" <devel@lists.sailfishos.org>
> Envoyé: Mercredi 28 Octobre 2015 13:00:16
> Objet: Re: [SailfishDevel] QtContacts & jolla-contacts app
> 
> your application should run in "privileged" group to do so. you can
> do
> it using suid bit and setgid call, of course such application is not
> allowed for harbour.
> 
> ------ Исходное сообщение ------
> От: "Michał" <m...@mkiol.net>
> Кому: devel@lists.sailfishos.org
> Отправлено: 28.10.2015 16:48:21
> Тема: [SailfishDevel] QtContacts & jolla-contacts app
> 
> >Hi,
> >
> >I'm struggling with an issue related to QtContacts API and
> >jolla-contacts app.
> >
> >Using QtContacts, I can get, update or create new contact. It works
> >as
> >expected, so my app is able to access phone's contacts. The issue I
> >have is when I create new contact via QtContacts, this contact is
> >not
> >visible in jolla-contacts app. I "see" this new contact via
> >QtContacts
> >in the same way how I "see" other contacts, but for some reason, I
> >can't see contacts created with QtContacts API in jolla-contacts.
> >
> >Any idea what could be wrong?
> >
> ><code>
> >
> >QContactManager cm = new QContactManager();
> >
> >QContactDisplayLabel label;
> >label.setLabel("Test Contact");
> >
> >QContactName name;
> >name.setFirstName("Test");
> >name.setLastName("Contact");
> >
> >QContactPhoneNumber number;
> >number.setNumber("111-111-111");
> >
> >QContact contact;
> >contact.saveDetail(&label);
> >contact.saveDetail(&name);
> >contact.saveDetail(&number);
> >
> >cm->saveContact(&contact));
> >
> ></code>
> >
> >-- Michal
> >
> >_______________________________________________
> >SailfishOS.org Devel mailing list
> >To unsubscribe, please send a mail to
> >devel-unsubscr...@lists.sailfishos.org
> 
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to