[SailfishDevel] QtContacts & jolla-contacts app
Michał
muki at mkiol.net
Wed Oct 28 13:05:57 UTC 2015
Everything is clear to me now.
Thank you for your help Andrey & Lucien!
Kind regards,
Michal
On 2015-10-28 13:54, Lucien Xu wrote:
> 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" <coderusinbox at gmail.com>
>> À: "Sailfish OS Developers" <devel at 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ł" <muki at mkiol.net>
>> Кому: devel at 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-unsubscribe at lists.sailfishos.org
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscribe at lists.sailfishos.org
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list