<div dir="ltr">Hi,<div style>I just noticed that application name is not set and QCoreApplication::applicationName() returns empty string. Neither QCoreApplication::setApplicationName(arg) nor QGuiApplication::setApplicationName(arg) seem to make a difference.</div>
<div style>My db file is currently just dumped to /home/nemo/.local/share appending with "/harbour-myapp/" is not possible, I guess that QCoreApplication::applicationName needs to be set in order to get the proper path.</div>
<div style><br></div><div style>Internet search came up only with one relevant page that just turned into a rant, but gave me little to no insight.</div><div style><br></div><div style>How do I set applicationName? <a href="https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html">https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html</a> seems to imly that it should happen automatically, so does Qt's documentation here: <a href="http://qt-project.org/doc/qt-5/qcoreapplication.html#applicationName-prop">http://qt-project.org/doc/qt-5/qcoreapplication.html#applicationName-prop</a></div>
<div style><br></div><div style>Thanks in advance</div><div style>Kris</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 August 2014 00:01,  <span dir="ltr"><<a href="mailto:fasza2mobile@gmail.com" target="_blank">fasza2mobile@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again, works like a charm.<br>
<div class="im HOEnZb"><br>
On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:<br>
</div><div class="HOEnZb"><div class="h5">> You shouldn't write in /usr/* directory. Rather use standard path:<br>
> See <a href="https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html" target="_blank">https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html</a><br>
><br>
><br>
> See also:<br>
> <a href="http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632" target="_blank">http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632</a><br>
><br>
><br>
><br>
> 2014-08-03 15:00 GMT+02:00 Krisztian Olah <<a href="mailto:fasza2mobile@gmail.com">fasza2mobile@gmail.com</a>>:<br>
><br>
> > Hi I need a bit of help with saving my database. When I do:<br>
> ><br>
> > QSqlDatabase db;<br>
> > db.setDatabaseName("/usr/share/<harbour-myapp>/data/data.sqlite")<br>
> > db.open()<br>
> > ...<br>
> ><br>
> > I get this error: "QSqlQuery::exec: database not open"<br>
> > thus the file isn't created at all.<br>
> > However if I change name to "data.sqlite" it works fine, but saves it to<br>
> > /home/nemo/<br>
> > Could someone tell me what I need to do in order to save the file under<br>
> > the correct path?<br>
> ><br>
> > Thanks in advance<br>
> > Kris<br>
> ><br>
> > _______________________________________________<br>
> > SailfishOS.org Devel mailing list<br>
> > To unsubscribe, please send a mail to<br>
> > <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
> ><br>
><br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
Sent from my Jolla</div></div></blockquote></div><br></div>