diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-26 19:16:40 -1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-07-04 23:00:12 -0700 |
commit | 5ce5b05521ee8d939fa4f2951eeec8021177ccdf (patch) | |
tree | 4f08175fcc018e6dc205d2a8e6e12e6d82299014 /qt-ui/models.cpp | |
parent | c7f8ada4ff5e84e2ea52e387806c640eee05f45f (diff) | |
download | subsurface-5ce5b05521ee8d939fa4f2951eeec8021177ccdf.tar.gz |
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>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 0288e7107..1fd5f74cb 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -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; |