Qt: Implement trip merging logic

So during my Maui trip, I had a short hiatus in diving, causing
subsurface to start a new trip for the last day of diving.  I could have
just started the old gtk branch to fix it up, but decided that I might
as well try to implement the "merge trip" logic in the Qt branch instead.

This is the end result of that.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2013-06-26 19:16:40 -10:00 committed by Dirk Hohndel
parent c7f8ada4ff
commit 5ce5b05521
4 changed files with 42 additions and 1 deletions

View file

@ -909,6 +909,9 @@ QVariant TripItem::data(int column, int role) const
{
QVariant ret;
if (role == DiveTripModel::TRIP_ROLE)
return QVariant::fromValue<void*>(trip);
if (role == DiveTripModel::SORT_ROLE)
return (qulonglong)trip->when;