summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-15 21:08:25 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-15 15:13:53 -0800
commit8827ea6f5d029e6b433ed5622ac7258db512f0ae (patch)
treefde14be0625b4826f5dcdf70c126ca57263a4ee1 /qt-ui/models.h
parent06bf0e1849559e0109c419beae627b44f477dc88 (diff)
downloadsubsurface-8827ea6f5d029e6b433ed5622ac7258db512f0ae.tar.gz
This moves the removal code to the model.
It's very important when programming via Model/View, in gtk or qt, to not mess with the model data outside of the model. We were deleting stuff that the model controlled outside of the model, so it thought that there was still data there. This fixes the deletion part, but there are also lots of other parts that I'll tackle in the next commits. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index af4659e9e..f212a18aa 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -200,6 +200,7 @@ public:
DiveTripModel(QObject* parent = 0);
Layout layout() const;
void setLayout(Layout layout);
+ void deleteSelectedDives();
private:
void setupModelData();