summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-16 18:41:47 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-16 20:19:55 -0800
commit4f9526ef8122f3496ee0ead986fcc10c500e0584 (patch)
tree29c6c838928c03bb47a404f3ff0c889a25bc7869 /qt-ui/models.h
parentc1a05fd03443ac9604684fa22a7efd5172bd2ffc (diff)
downloadsubsurface-4f9526ef8122f3496ee0ead986fcc10c500e0584.tar.gz
Fix wrong handling of Dive Table, and revert some wrong changes.
This patch just reverts some wrong changes that I'v done on a past commit ( sorry ) and correctly handles the selectDive, by using a IDX instead of the dive pointer, as dirk told me it's extremely error-prone since the pointer can change. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index f212a18aa..de9aab5ce 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -192,7 +192,7 @@ public:
enum Column {NR, DATE, RATING, DEPTH, DURATION, TEMPERATURE, TOTALWEIGHT,
SUIT, CYLINDER, NITROX, SAC, OTU, MAXCNS, LOCATION, COLUMNS };
- enum ExtraRoles{STAR_ROLE = Qt::UserRole + 1, DIVE_ROLE, TRIP_ROLE, SORT_ROLE};
+ enum ExtraRoles{STAR_ROLE = Qt::UserRole + 1, DIVE_ROLE, TRIP_ROLE, SORT_ROLE, DIVE_IDX};
enum Layout{TREE, LIST, CURRENT};
Qt::ItemFlags flags(const QModelIndex &index) const;
@@ -200,8 +200,6 @@ public:
DiveTripModel(QObject* parent = 0);
Layout layout() const;
void setLayout(Layout layout);
- void deleteSelectedDives();
-
private:
void setupModelData();
QMap<dive_trip_t*, TripItem*> trips;