mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c7f8ada4ff
commit
5ce5b05521
4 changed files with 42 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue