Re: [SailfishDevel] sqlite absolute path

2014-08-07 Thread Андрей Кожевников
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

Re: [SailfishDevel] sqlite absolute path

2014-08-07 Thread Krisztian Olah
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

Re: [SailfishDevel] sqlite absolute path

2014-08-07 Thread Andrey Kozhevnikov
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

Re: [SailfishDevel] sqlite absolute path

2014-08-07 Thread Krisztian Olah
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

Re: [SailfishDevel] sqlite absolute path

2014-08-06 Thread Krisztian Olah
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

Re: [SailfishDevel] sqlite absolute path

2014-08-03 Thread fasza2mobile
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

Re: [SailfishDevel] sqlite absolute path

2014-08-03 Thread fasza2mobile
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://

Re: [SailfishDevel] sqlite absolute path

2014-08-03 Thread Lukas Vogel
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

[SailfishDevel] sqlite absolute path

2014-08-03 Thread Krisztian Olah
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