diff options
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 8fedf6a35..a89557570 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -873,7 +873,7 @@ QVariant TripItem::data(int column, int role) const if (role == Qt::DisplayRole) { switch (column) { case DiveTripModel::NR: - ret = QString(trip->location) + ", " + QString(get_trip_date_string(trip->when, trip->nrdives)); + ret = QString(trip->location) + ", " + get_trip_date_string(trip->when, trip->nrdives); break; } } @@ -953,10 +953,7 @@ QVariant DiveItem::data(int column, int role) const QString DiveItem::displayDate() const { - char *buf = get_dive_date_string(dive->when); - QString date(buf); - free(buf); - return date; + return get_dive_date_string(dive->when); } QString DiveItem::displayDepth() const |