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;
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;