<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
I think QStandardPaths use applicationName and organizationName
when constructing paths.<br>
<br>
So solution would be something like <br>
app->setApplicationName("harbour-yourapp");<br>
app->setOrganizationName("harbour-yourapp");<br>
<br>
And then QStandardPaths will start giving paths that follow
harbour guidance.<br>
<br>
BR,<br>
Vesku<br>
<br>
<br>
On 01/19/2014 05:32 PM, Robin Burchell wrote:<br>
</div>
<blockquote
cite="mid:75B50403-8543-4560-B388-AE706F5DB98B@jolla.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hi,
<div><br>
</div>
<div>Can you please provide a small sample demonstrating this? As
I’m quite sure it works for our own uses.</div>
<div><br>
</div>
<div>BR,</div>
<div>Robin</div>
<div><br>
<div>
<div>On 19 Jan 2014, at 14:34, Sylvain B. <<a
moz-do-not-send="true" href="mailto:sthocs@hotmail.com">sthocs@hotmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class="hmmessage" style="font-size: 12pt; font-family:
Calibri; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div dir="ltr">Hey,<br>
My app did not want to read the some cached content it
was supposed to have written in<span
class="Apple-converted-space"> </span><tt>QStandardPaths::CacheLocation</tt>.<br>
To understand why, I tried to run it from the terminal,
and... everything is working fine.<br>
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:<br>
<br>
<tt>QStandardPaths::CacheLocation<span
class="Apple-converted-space"> </span></tt>returns
/home/nemo/.cache/mdeclarativecache_pre_initialized_qapplication-XXXXX<br>
<br>
XXXXX is a random number, so each time I run my app, it
creates a new one.<br>
When run from terminal,<span
class="Apple-converted-space"> </span><tt>QStandardPaths::CacheLocation<span
class="Apple-converted-space"> </span></tt>correctly
returns /home/nemo/.cache/<br>
<br>
I tried with<span class="Apple-converted-space"> </span><tt>QStandardPaths::DataLocation<span
class="Apple-converted-space"> </span></tt>but it's
the same, I get
/home/nemo/.local/share/AppName/mdeclarativecache_pre_initialized_qapplication-XXXXX<br>
<br>
So for the moment, I temporarily hardcoded
/home/nemo/.cache/<br>
<br>
Thanks!<br>
Sylvain.<br>
</div>
_______________________________________________<br>
<a moz-do-not-send="true" href="http://sailfishos.org/">SailfishOS.org</a><span
class="Apple-converted-space"> </span>Devel mailing list</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Vesa-Matti Hartikainen
Jolla Oy
<a class="moz-txt-link-freetext" href="http://jolla.com">http://jolla.com</a>
p. +358 50 487 6067</pre>
</body>
</html>