Show trip date (with number of dives) in dive/trip list

That was easy :-)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-02 09:33:51 -07:00
parent 6b7797140b
commit e6ec626c97

View file

@ -404,13 +404,15 @@ QVariant TripItem::data(int column, int role) const
{ {
QVariant ret; QVariant ret;
if (column != LOCATION) { if (role == Qt::DisplayRole) {
return ret; switch (column) {
} case LOCATION:
ret = QString(trip->location);
switch (role) { break;
case Qt::DisplayRole: case DATE:
ret = QString(trip->location); ret = QString(get_trip_date_string(trip->when, trip->nrdives));
break;
}
} }
return ret; return ret;