February 27, 2013

epicfailguy93 epicfailguy93
Lab Rat
27 posts

[SOLVED] QtQuick.LocalStorage 2.0 on Blackberry Playbook

 

Initializing the database on my playbook does not work like on the desktop so I had a few questions:
1) Where the database is stored on the device?
2) If it is playbook:/accounts/1000/appdata/%appname%, how do I get access to the directory? It seems I do not have permission to access this directory.
3) Am I can from my program completely clean database (drop all tables)?

1 reply

February 27, 2013

epicfailguy93 epicfailguy93
Lab Rat
27 posts

I’m sorry, it was all working properly.
You can not remove all tables from the database with one command, only separately, eg

  1. var db = Sql.LocalStorage.openDatabaseSync(..);
  2.  
  3. function clearScores() {
  4.     db.transaction(
  5.         function(tx) {
  6.             tx.executeSql('DROP DATABASE Scores;');
  7.         }
  8.     );
  9. }

A lot of interesting information here http://doc-snapshot.qt-project.org/qt5-dev/qtquick/qmlmodule-qtquick-localstorage2-qtquick-localstorage-2.html
and in the source code: qtdeclarative/src/imports/localstorage/plugin.cpp

 
  ‹‹ Drag a copy of an item to Droparea      glPopAttrib and glPushAttrib on GLES for rendering fbo to a qquickitem ››

You must log in to post a reply. Not a member yet? Register here!