Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11.0
-
None
-
MacOs, Windows, Android
-
0a2aaee61cfc2888bc71f54ac5b165d248cbf5e8
Description
When running application compiled with CONFIG+=qtquickcompiler option, LocalStorage inited in Database.js file does not inited. Console error:
../Test4/Database.js:7: ReferenceError: Sql is not defined
Database.js file is:
.pragma library .import QtQuick.LocalStorage 2.0 as Sql var db = null function connectToDB() { db = Sql.LocalStorage.openDatabaseSync("Test4", "1.0", "Local test Data", 1000000) if (db) { db.transaction(function (tx) { tx.executeSql( 'CREATE TABLE IF NOT EXISTS Table1(id NUMBER, str TEXT)') }) } }
Without qtquickcompiler all works as expected.
To reproduce error run test project "Test4" from attachment.