diff --git a/dialer/package/contents/ui/Dialer/History.qml b/dialer/package/contents/ui/Dialer/History.qml index 07ec51a8..ea29fd4b 100644 --- a/dialer/package/contents/ui/Dialer/History.qml +++ b/dialer/package/contents/ui/Dialer/History.qml @@ -93,11 +93,8 @@ Item { } section { property: "date" - labelPositioning: ViewSection.CurrentLabelAtStart delegate: PlasmaComponents.ListItem { - //width: view.width - //height: childrenRect.height - //color: syspal.base + id: sectionItem sectionDelegate: true PlasmaComponents.Label { text: Qt.formatDate(section, Qt.locale().dateFormat(Locale.LongFormat)); diff --git a/dialer/package/contents/ui/main.qml b/dialer/package/contents/ui/main.qml index 93a7095c..3b919da6 100644 --- a/dialer/package/contents/ui/main.qml +++ b/dialer/package/contents/ui/main.qml @@ -109,12 +109,13 @@ ApplicationWindow { db.transaction( function(tx) { - var rs = tx.executeSql("INSERT INTO History VALUES(NULL, ?, date('now'), datetime('now'), ?, ? )", [number, duration, callType]); + var rs = tx.executeSql("INSERT INTO History VALUES(NULL, ?, datetime('now'), ?, ? )", [number, duration, callType]); var rs = tx.executeSql('SELECT * FROM History where id=?', [rs.insertId]); for(var i = 0; i < rs.rows.length; i++) { var row = rs.rows.item(i); + row.date = Qt.formatDate(row.time, "yyyy-MM-dd"); row.originalIndex = historyModel.count; historyModel.append(row); } @@ -168,12 +169,13 @@ ApplicationWindow { function(tx) { // Create the database if it doesn't already exist //callType: wether is incoming, outgoing, unanswered - tx.executeSql('CREATE TABLE IF NOT EXISTS History(id INTEGER PRIMARY KEY AUTOINCREMENT, number TEXT, date DATE, time DATETIME, duration INTEGER, callType INTEGER)'); + tx.executeSql('CREATE TABLE IF NOT EXISTS History(id INTEGER PRIMARY KEY AUTOINCREMENT, number TEXT, time DATETIME, duration INTEGER, callType INTEGER)'); var rs = tx.executeSql('SELECT * FROM History'); for(var i = 0; i < rs.rows.length; i++) { var row = rs.rows.item(i); + row.date = Qt.formatDate(row.time, "yyyy-MM-dd"); row.originalIndex = historyModel.count; historyModel.append(row); }