Re: [SailfishDevel] Getting odd error when attempting to use LocalStorage.changeVersion

2014-02-16 Thread Rob Hoelz
On Sat, 15 Feb 2014 17:42:15 +0100
Rob Hoelz r...@hoelz.ro wrote:

 On Sat, 15 Feb 2014 01:47:52 +0100
 Rob Hoelz r...@hoelz.ro wrote:
 
  Hi all,
  
  I'm working on an update for my Sudoku application, and one of the
  new features necessitates a storage schema change.  So I wrote a
  utility function that tries to open a connection with the correct
  version, and falls back to calling db.changeVersion if there is a
  version mismatch. After testing my new code out, I get the
  following output from my application:
  
  [nemo@jolla Databases]$ harbour-sudoku 
  [D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using
  Wayland-EGL [W] QQmlImportDatabase::importPlugin:1697 - Module
  'Sailfish.Silica' does not contain a module identifier directive -
  it cannot be protected from external registrations. [D]
  MLocalThemeDaemonClient::MLocalThemeDaemonClient:81 -
  MLocalThemeDaemonClient::MLocalThemeDaemonClient(const
  QString,QObject*) Theme:  jolla-ambient [D]
  MLocalThemeDaemonClient::MLocalThemeDaemonClient:112 -
  LocalThemeDaemonClient: Looking for assets in
  (/usr/share/themes/blanco/meegotouch,
  /usr/share/themes/jolla-ambient/meegotouch) [W]
  QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database:
  unable to open database:   QSqlQuery::prepare: database not open
  DeclarativeCoverWindow: I have a default alpha buffer [W]
  QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database:
  unable to open database:   [W] QSqlDatabasePrivate::database:280 -
  QSqlDatabasePrivate::database: unable to open database:  
  QSqlQuery::prepare: database not open
  
  Here's the code for the routine in question:
  https://github.com/hoelzro/harbour-sudoku/blob/db-upgrade/qml/pages/SudokuBoard.qml#L126
  
  It looks to me like once LocalStorage attempts to open a database
  and fails, it doesn't actually open databases in the future, but I
  could be misunderstanding something.
  
  If anyone could help, I'd really appreciate it.
  
  Thanks,
  Rob
  ___
  SailfishOS.org Devel mailing list
  
 
 This seems to be a generic Qt issue; I've started a thread here:
 
 http://qt-project.org/forums/viewthread/38458/
 
 -Rob
 ___
 SailfishOS.org Devel mailing list
 

I found a solution to my issue and posted it on the forum thread I
listed above.

-Rob
___
SailfishOS.org Devel mailing list


[SailfishDevel] Getting odd error when attempting to use LocalStorage.changeVersion

2014-02-14 Thread Rob Hoelz
Hi all,

I'm working on an update for my Sudoku application, and one of the new
features necessitates a storage schema change.  So I wrote a utility
function that tries to open a connection with the correct version, and
falls back to calling db.changeVersion if there is a version mismatch.
After testing my new code out, I get the following output from my
application:

[nemo@jolla Databases]$ harbour-sudoku 
[D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using Wayland-EGL [W] 
QQmlImportDatabase::importPlugin:1697 - Module
'Sailfish.Silica' does not contain a module identifier directive - it cannot be 
protected from external registrations. [D]
MLocalThemeDaemonClient::MLocalThemeDaemonClient:81 - 
MLocalThemeDaemonClient::MLocalThemeDaemonClient(const QString,QObject*) 
Theme:  jolla-ambient [D]
MLocalThemeDaemonClient::MLocalThemeDaemonClient:112 - LocalThemeDaemonClient: 
Looking for assets in (/usr/share/themes/blanco/meegotouch, 
/usr/share/themes/jolla-ambient/meegotouch) [W]
QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database: unable to 
open database:   QSqlQuery::prepare: database not open
DeclarativeCoverWindow: I have a default alpha buffer [W]
QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database: unable to 
open database:   [W] QSqlDatabasePrivate::database:280 -
QSqlDatabasePrivate::database: unable to open database:  
QSqlQuery::prepare: database not open

Here's the code for the routine in question: 
https://github.com/hoelzro/harbour-sudoku/blob/db-upgrade/qml/pages/SudokuBoard.qml#L126

It looks to me like once LocalStorage attempts to open a database and fails, it 
doesn't actually open databases in the future, but I could be misunderstanding 
something.

If anyone could help, I'd really appreciate it.

Thanks,
Rob
___
SailfishOS.org Devel mailing list