diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index dd2cf2f84..12a0398a0 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -404,13 +404,15 @@ QVariant TripItem::data(int column, int role) const { QVariant ret; - if (column != LOCATION) { - return ret; - } - - switch (role) { - case Qt::DisplayRole: - ret = QString(trip->location); + if (role == Qt::DisplayRole) { + switch (column) { + case LOCATION: + ret = QString(trip->location); + break; + case DATE: + ret = QString(get_trip_date_string(trip->when, trip->nrdives)); + break; + } } return ret;