diff options
-rw-r--r-- | qt-ui/mainwindow.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index de7bb5460..551c28faa 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -47,12 +47,17 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()) struct dive *d; qDebug("address of dive_table %p", &dive_table); for_each_dive(i, d) { + struct tm tm; + char *buffer; + utc_mkdate(d->when, &tm); + buffer = get_dive_date_string(&tm); dive = new DiveItem(d->number, - QDateTime::fromTime_t(d->when).toString(), - (float)d->maxdepth.mm/1000 , - (float)d->duration.seconds/60, - d->location, - root); + buffer, + (float)d->duration.seconds/60, + (float)d->maxdepth.mm/1000 , + d->location, + root); + free(buffer); } } } |