[SailfishDevel] QStandardPaths not working when app is run from Launcher

Robin Burchell robin.burchell at jolla.com
Sun Jan 19 15:32:51 UTC 2014


Hi,

Can you please provide a small sample demonstrating this? As I’m quite sure it works for our own uses.

BR,
Robin

On 19 Jan 2014, at 14:34, Sylvain B. <sthocs at hotmail.com<mailto:sthocs at hotmail.com>> wrote:

Hey,
My app did not want to read the some cached content it was supposed to have written in QStandardPaths::CacheLocation.
To understand why, I tried to run it from the terminal, and... everything is working fine.
Since we don't have logs when we run the app directly from Launcher, I updated it to display some logs directly in the UI and I figured out that, when the app is run from the Launcher on the actual device (it's ok on the emulator), QStandardPaths does not work correctly:

QStandardPaths::CacheLocation returns /home/nemo/.cache/mdeclarativecache_pre_initialized_qapplication-XXXXX

XXXXX is a random number, so each time I run my app, it creates a new one.
When run from terminal, QStandardPaths::CacheLocation correctly returns /home/nemo/.cache/

I tried with QStandardPaths::DataLocation but it's the same, I get /home/nemo/.local/share/AppName/mdeclarativecache_pre_initialized_qapplication-XXXXX

So for the moment, I temporarily hardcoded /home/nemo/.cache/

Thanks!
Sylvain.
_______________________________________________
SailfishOS.org<http://sailfishos.org/> Devel mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140119/9b8c45a5/attachment.html>


More information about the Devel mailing list