From e774c8077b516652dc0139a5bac93e60f0ed9b9f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 5 Jan 2016 22:53:32 -0800 Subject: QML UI: allow edit of dive date and time This is a bit more complicated because we are asking the user to edit the text field instead of giving them a date and time picker. This is not a great choice, but let's run with it for now. One downside is that the user is likely going to edit the date "Oct 29" -> "Oct 25" without adjusting the day of the week. And if we then try to parse that Qt correctly complains about an invalid date. So we hack around this by removing the day of the week from both the format and the date entered (which of course now will break things if the user did, in fact, adjust the day of the week). As I said, not a great solution. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveDetails.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index a99aa628c..27a8996da 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -52,9 +52,10 @@ MobileComponents.Page { iconName: checked ? "view-readermode" : "document-edit" onTriggered: { if (diveDetailsWindow.state == "edit") { - manager.commitChanges(dive_id, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText, + manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText, detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.suitText, detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.notesText) + date = detailsEdit.dateText location = detailsEdit.locationText // gps = detailsEdit.gps duration = detailsEdit.durationText -- cgit v1.2.3-70-g09d2