Re: [SailfishDevel] Deploy QSQLite database

2014-06-17 Thread Saija Saarenpää
Hi,

What comes to having datalocation path variable in the .pro file:
I was having similar thoughts when I wanted to install something in the 
writable storage location, but I was corrected. Nothing should be installed in 
the home directory with the application, but under application directory 
/usr/share/harbour-yourappname/. There can be also subdirs under that location. 
Then, at runtime, you can create the writable storage location if it does not 
exist, and copy or create stuff there. Preferably the app would not pre-install 
any data, but everything would be downloaded / created runtime. That would be 
the ideal though, not always applicable.

- Saija
@setelani
matrixx #sailfishOS

Lähetetty iPadista

> "Andrey Kozhevnikov"  kirjoitti 18.6.2014 kello 8.50:
> 
> you should build and deploy as RPM package ;)
> 
> 18.06.2014 03:42, Lukas Vogel пишет:
>> Hi there,
>> 
>> I try to create an app in which I want to have an existing database bind in 
>> the binary.
>> 
>> My approach was the following: 
>> in pro file:
>> QT += sql
>> database.files = stations.db
>> database.path = /home/nemo/.local/share/harbour-qtimetable/harbour-qtimetable
>> 
>> INSTALLS += database
>> To open the database:
>> db = QSqlDatabase::addDatabase("QSQLITE");
>> db.setDatabaseName(DB_NAME);
>> db.setUserName(USER_NAME);
>> db.setPassword(PASSWORD);
>> db.setConnectOptions("QSQLITE_OPEN_READONLY=1");
>> if(db.open()) {...}
>> for DB_NAME I use 
>> QStandardPaths::writableLocation(QStandardPaths::DataLocation) with 
>> stations.db appended. 
>> However when I deploy this will fail as the path on emulator has
>> 
>> home/deploy/installroot/ prefix, and when deploying on device there is 
>> /opt/sdk/..
>> prefix. 
>> This makes testing quite annoying, is there a genuine way to get the 
>> database to open both in the emulator and the device? 
>> Side question is there a "standard path::datalocation" variable for the .pro 
>> file?
>> Thanks for any help,
>> Lukas
>> 
>> 
>> ___
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
> 
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Deploy QSQLite database

2014-06-17 Thread Andrey Kozhevnikov

you should build and deploy as RPM package ;)

18.06.2014 03:42, Lukas Vogel ?:

Hi there,

I try to create an app in which I want to have an existing database 
bind in the binary.


My approach was the following:
in pro file:
QT+=sql
database.files  =  stations.db
database.path  =  /home/nemo/.local/share/harbour-qtimetable/harbour-qtimetable

INSTALLS += database
To open the database:
db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(DB_NAME);
db.setUserName(USER_NAME);
db.setPassword(PASSWORD);
db.setConnectOptions("QSQLITE_OPEN_READONLY=1");
if(db.open()) {...}
for DB_NAME I use 
QStandardPaths::writableLocation(QStandardPaths::DataLocation) with stations.db 
appended.
However when I deploy this will fail as the path on emulator has

home/deploy/installroot/ prefix, and when deploying on device there is 
/opt/sdk/..
prefix.
This makes testing quite annoying, is there a genuine way to get the database 
to open both in the emulator and the device?
Side question is there a "standard path::datalocation" variable for the .pro 
file?
Thanks for any help,
Lukas


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Qt 5.2 in devel

2014-06-17 Thread Robin Burchell
Sorry folks. This wasn’t intended to be posted here, but, have a slight visual 
on what’s going on behind the curtain anyway. :)

tl;dr: Qt 5.2 upgrade is on the way in the nearish (but not immediate) future :)

Fra: Robin Burchell mailto:robin.burch...@jolla.com>>
Svar til: Sailfish OS Developers 
mailto:devel@lists.sailfishos.org>>
Dato: onsdag 18. juni 2014 05:10
Til: Bernd Wachter mailto:bernd.wach...@jolla.com>>, 
Gunnar Sletta mailto:gunnar.sle...@jolla.com>>, Denis 
Zalevskiy mailto:denis.zalevs...@jolla.com>>, Giulio 
Camuffo mailto:giulio.camu...@jolla.com>>
Kopi: Sailfish OS Developers 
mailto:devel@lists.sailfishos.org>>
Emne: [SailfishDevel] Qt 5.2 in devel

Hello intrepid developers,

Qt 5.2 rebuilds have (finally, thank god) finished in devel. I’ve updated a 
single device (via version —dup) so far without too many ill effects (see 
below), and done some brief smoke testing. The device rebooted the user session 
successfully, and rebooted to a UI OK, applications start, and at a very light 
play, they appear to be in reasonable shape.

The one symptom of bad behavior I’ve seen so far is that orientation does not 
appear to work (at least once), this appears to be a hardware adaptation 
problem: /system/bin/sensord was not running on reboot. Rebooting again made it 
appear.

There are some rough edges, but nothing apparently life threatening:

  *   Gunnar, can you please remove the v8 dependency from the scene graph 
adaptation plugin?
  *   Bernd, can you please remove cutes-qt5 from sailfish-version (and remove 
cutes-qt5 from the repos)? I guess there’s nothing else requiring it after 
backup’s removal of it (Denis/Giulio, can you help out with anything needed 
here?)
  *   Cor appears to be failing to build on ARM in devel. I don’t think this is 
related to Qt, but needs checking. Denis?

Developers: please upgrade your devices with some caution and see how your 
areas look.

I’m going to head to bed now. If problems occur, if it isn’t urgent, file it in 
bugzilla, and add the Qt5.2 keyword & CC me. If it is urgent, please try 
pretend that it isn’t until I’m around again, or alternatively, you can (try 
to) call me on +47 9059 2624. If you’re lucky, I may even leave the phone off 
silent :).

BR,
Robin
___ SailfishOS.org Devel mailing 
list To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Qt 5.2 in devel

2014-06-17 Thread Robin Burchell
Hello intrepid developers,

Qt 5.2 rebuilds have (finally, thank god) finished in devel. I’ve updated a 
single device (via version —dup) so far without too many ill effects (see 
below), and done some brief smoke testing. The device rebooted the user session 
successfully, and rebooted to a UI OK, applications start, and at a very light 
play, they appear to be in reasonable shape.

The one symptom of bad behavior I’ve seen so far is that orientation does not 
appear to work (at least once), this appears to be a hardware adaptation 
problem: /system/bin/sensord was not running on reboot. Rebooting again made it 
appear.

There are some rough edges, but nothing apparently life threatening:

  *   Gunnar, can you please remove the v8 dependency from the scene graph 
adaptation plugin?
  *   Bernd, can you please remove cutes-qt5 from sailfish-version (and remove 
cutes-qt5 from the repos)? I guess there’s nothing else requiring it after 
backup’s removal of it (Denis/Giulio, can you help out with anything needed 
here?)
  *   Cor appears to be failing to build on ARM in devel. I don’t think this is 
related to Qt, but needs checking. Denis?

Developers: please upgrade your devices with some caution and see how your 
areas look.

I’m going to head to bed now. If problems occur, if it isn’t urgent, file it in 
bugzilla, and add the Qt5.2 keyword & CC me. If it is urgent, please try 
pretend that it isn’t until I’m around again, or alternatively, you can (try 
to) call me on +47 9059 2624. If you’re lucky, I may even leave the phone off 
silent :).

BR,
Robin
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Deploy QSQLite database

2014-06-17 Thread Lukas Vogel
Hi there,

I try to create an app in which I want to have an existing database bind in
the binary.

My approach was the following:
in pro file:
QT += sql


database.files = stations.db

database.path = /home/nemo/.local/share/harbour-qtimetable/harbour-qtimetable

INSTALLS += database


To open the database:

db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(DB_NAME);
db.setUserName(USER_NAME);
db.setPassword(PASSWORD);
db.setConnectOptions("QSQLITE_OPEN_READONLY=1");

if(db.open()) {...}


for DB_NAME I use
QStandardPaths::writableLocation(QStandardPaths::DataLocation) with
stations.db appended.


However when I deploy this will fail as the path on emulator has

home/deploy/installroot/ prefix, and when deploying on device there is
/opt/sdk/..

prefix.


This makes testing quite annoying, is there a genuine way to get the
database to open both in the emulator and the device?


Side question is there a "standard path::datalocation" variable for
the .pro file?


Thanks for any help,

Lukas
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Prototype 'TextBaseItem' from 'TextBase' could not be resolved (M301)

2014-06-17 Thread i...@flyingfischer.ch

Thanks Juha for checking this out! This helps me to circle the issue...

Yes I am using the Sailfish OS Emulator right now. Not much to deploy to 
the phone right now.


I will set up the IDE on a different box and try out different versions 
of Virtualbox.


Best regards
Markus



___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Prototype 'TextBaseItem' from 'TextBase' could not be resolved (M301)

2014-06-17 Thread Juha Kallioinen

On 16.06.2014 19:18, i...@flyingfischer.ch wrote:

Thanks for the information!

The import statement makes the TextField error disappear. But the 
other errors remain


(process:957): dconf-CRITICAL **: unable to open file 
'/etc/dconf/db/vendor': /etc/dconf/db/vendor: invalid gvdb header; 
expect degraded performance


and when creating a new page:

[W] unknown:111 - 
file:///usr/lib/qt5/qml/Sailfish/Silica/PageStack.js:111: TypeError: 
Cannot call method 'connect' of undefined


I will try to investigate further...



Hi,

I cloned your github project and built it and deployed it to the 
Sailfish OS Emulator. At least, I'm not seeing that dconf-CRITICAL 
message. Perhaps you've managed to resolve it?


You say that you're not installing your App to the phone, so I assume 
you're installing it to the Sailfish OS Emulator? It mostly seems to 
work for me.


I do get that [W] unknown:111 - warning when clicking through the 
different pages, but I think that is a problem in your application, 
which you should be able to resolve.


Best regards,
 Juha
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org