~rpadovani/ubuntu-calculator-app/localStorage20141220

« back to all changes in this revision

Viewing changes to app/engine/CalculationHistory.qml

  • Committer: Riccardo Padovani
  • Date: 2014-12-23 17:37:31 UTC
  • Revision ID: rpadovani@ubuntu.com-20141223173731-swfhpacd123ubqw7
s/favourite/isFavourite

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
            formula: ''
35
35
            result: ''
36
36
            date: 0
37
 
            favourite: 0
 
37
            isFavourite: 0
38
38
            favouriteText: ''
39
39
        }
40
40
    }
60
60
                formula TEXT NOT NULL,
61
61
                result TEXT NOT NULL,
62
62
                date INTEGER NOT NULL DEFAULT 0,
63
 
                favourite BOOL DEFAULT false,
 
63
                isFavourite BOOL DEFAULT false,
64
64
                favouriteText TEXT
65
65
            )'
66
66
        ];
101
101
        history.append({"formula": formula,
102
102
            "result": result,
103
103
            "date": date,
104
 
            "favourite": 0,
 
104
            "isFavourite": 0,
105
105
            "favouriteText": ''});
106
106
 
107
107
        // TODO: move this function to a plave that retards the execution to
115
115
        calculationHistoryDatabase.transaction(
116
116
            function (tx) {
117
117
                tx.executeSql('INSERT INTO Calculations (
118
 
                    formula, result, date, favourite, favouriteText) VALUES(
 
118
                    formula, result, date, isFavourite, favouriteText) VALUES(
119
119
                    ?, ?, ?, ?, ?)',
120
120
                    [formula, result, date, false, '']
121
121
                );