mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Use helper function to get dive date string
Correct order of arguments in the DiveItem constructor call. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
75765be14c
commit
26076610e5
1 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue