@@ -24,14 +24,14 @@ QtObject {
2424 property var db: null
2525
2626 function openDB() {
27− if(db !== null) return;
27+ if (db !== null) return;
2828
2929 // db = LocalStorage.openDatabaseSync(identifier, version, description, estimated_size, callback(db))
3030 db = LocalStorage.openDatabaseSync("unity8", "0.1", "", 100000);
3131
3232 try {
33− db.transaction(function(tx){
34− tx.executeSql('CREATE TABLE IF NOT EXISTS settings(windowId TEXT UNIQUE, x INTEGER, y INTEGER, width INTEGER, height INTEGER)');
33+ db.transaction(function(tx) {
34+ tx.executeSql('CREATE TABLE IF NOT EXISTS windowproperties(windowId TEXT UNIQUE, x INTEGER, y INTEGER, width INTEGER, height INTEGER)');
3535 });
3636 } catch (err) {
3737 console.log("Error creating table in database: " + err);
@@ -42,7 +42,7 @@ QtObject {
4242 function savePosition(windowId, x, y, width, height) {
4343 priv.openDB();
4444 priv.db.transaction( function(tx){
45− tx.executeSql('INSERT OR REPLACE INTO settings VALUES(?, ?, ?, ?, ?)', [windowId, x, y, width, height]);
45+ tx.executeSql('INSERT OR REPLACE INTO windowproperties VALUES(?, ?, ?, ?, ?)', [windowId, x, y, width, height]);
4646 });
4747 }
4848
@@ -50,9 +50,9 @@ QtObject {
5050 priv.openDB();
5151 var res = new Object();
5252 priv.db.transaction(function(tx) {
53− var rs = tx.executeSql('SELECT x, y, width, height FROM settings WHERE windowId=?;', [windowId]);
53+ var rs = tx.executeSql('SELECT x, y, width, height FROM windowproperties WHERE windowId=?;', [windowId]);
5454 if (rs.rows.length === 0) {
55− res = unefined;
55+ res = undefined;
5656 } else {
5757 res.x = rs.rows.item(0).x
5858 res.y = rs.rows.item(0).y