Possibly because when you launch it from the SDK it runs either as a
different user, or just isn't part of the session on the phone, ie. not all
the environment variables are set, etc.


Timur



On Mon, Jan 6, 2014 at 1:23 AM, Karsten Todtermuschke <kat...@web.de> wrote:

> Hi Matze,
>
> I observed the same issue.
>
> I used QtContacts 5.0 in Qml and selected "org.nemomobile.contacts.sqlite"
> from the available managers for ContactModel.manager
>
> In the output from the application started with QtCreator I read the error
> message: Unable to create contacts database directory
> /home/nemo/.local/share/system//privileged/Contacts/qtcontacts-sqlite
>
> so there is a double-slash in the path. I already found at the source of
> qtcontacts-sqlite
>
> in file:
>
>
> https://github.com/nemomobile/qtcontacts-sqlite/blob/master/src/engine/contactsdatabase.cpp
>
> and method:
>
> QSqlDatabase ContactsDatabase::open(const QString &databaseName)
>
> how the path is created:
>
>     QString privilegedDataDir(QString("%1/%2/")
>             .arg(QString::fromLatin1(QTCONTACTS_SQLITE_CENTRAL_DATA_DIR))
>             .arg(QString::fromLatin1(QTCONTACTS_SQLITE_PRIVILEGED_DIR)));
>
> I further found the defines in
> https://github.com/nemomobile/qtcontacts-sqlite/blob/master/src/engine/engine.prowhere
>
> DEFINES +=
>
> 'QTCONTACTS_SQLITE_CENTRAL_DATA_DIR=\'\"/home/nemo/.local/share/system/\"\''
>
> already includes the slash. So at this point I know why the double slash
> is in
> the path.
>
> What I do not understand at all is: Why it works when I launch it at the
> phone?
>
> Best regards,
>
> Karsten
>
>
> Am Sonntag 05 Januar 2014, 23:10:46 schrieb Matthias Barmeier:
> >Hi,
> >
> >I am unable to access the phone book when running my app from QtCreator
> >on the phone.
> >Is this a security feature ?
> >Is it possible to work with a fake contact DB ?
> >
> >Ciao
> >     Matze
> >_______________________________________________
> >SailfishOS.org Devel mailing list
>
> _______________________________________________
> SailfishOS.org Devel mailing list
>
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to