Write operations never creates path for file if it not exists. You should
care about it yourself.
08.08.2014 3:44 пользователь "Krisztian Olah"
написал:
> Thanks Andrey,
> I thought it was supposed to get created automatically.
> It works flawlessly now
> Thanks again
> Kris
>
>
> On 7 August 201
Thanks Andrey,
I thought it was supposed to get created automatically.
It works flawlessly now
Thanks again
Kris
On 7 August 2014 21:09, Andrey Kozhevnikov wrote:
> QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
> if (!dir.exists()) {
>
> dir.mkpath(QStandardPaths::w
QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
if (!dir.exists()) {
dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
}
08.08.2014 03:06, Krisztian Olah пишет:
Hi again,
I fixed the issue with applicationName() and also figured out why
setA
Hi again,
I fixed the issue with applicationName() and also figured out why
setApplicationName() didn't work for me. Basically I had a global Database
object that got initalized before main() was called, therefore setting
applicationName in main would have no effect in Database. Database is now
a
Hi,
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.
My db file is currently just dumped to /home/nemo/.local/share
Thanks again, works like a charm.
On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:
> You shouldn't write in /usr/* directory. Rather use standard path:
> See https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
>
>
> See also:
> http://comments.gmane.org/gmane.co
Thanks Lukas, I'll have a look at it when I get hone tonight.
On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:
> You shouldn't write in /usr/* directory. Rather use standard path:
> See https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
>
>
> See also:
> http://
You shouldn't write in /usr/* directory. Rather use standard path:
See https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
See also:
http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632
2014-08-03 15:00 GMT+02:00 Krisztian Olah :
> Hi I need a bit of help wi
Hi I need a bit of help with saving my database. When I do:
QSqlDatabase db;
db.setDatabaseName("/usr/share//data/data.sqlite")
db.open()
...
I get this error: "QSqlQuery::exec: database not open"
thus the file isn't created at all.
However if I change name to "data.sqlite" it works fine, but sav