diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-05 21:17:37 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-05 21:17:37 -0700 |
commit | 1634c62b9a156b59faab4ed89d64c359ba0580f2 (patch) | |
tree | eda73fe7126132f586ef839a110e62b824d65dcc /qt-models/divelistmodel.h | |
parent | f16a3a1709be50cb2ed4f4ca0e1e9bb5217cc25f (diff) | |
download | subsurface-1634c62b9a156b59faab4ed89d64c359ba0580f2.tar.gz |
DiveListModel: don't add the dives one at a time
Most of the time we are adding all the dives, so do this in a single model
operation. This makes the case when adding a single dive (in the undo delete
function) slightly more complicated, but that seems totally worth it for the
speedup in the common case.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/divelistmodel.h')
-rw-r--r-- | qt-models/divelistmodel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index 39c3497b9..05514ecba 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -30,7 +30,8 @@ public: static DiveListModel *instance(); DiveListModel(QObject *parent = 0); - void addDive(dive *d); + void addDive(QList<dive *> listOfDives); + void addAllDives(); void insertDive(int i, DiveObjectHelper *newDive); void removeDive(int i); void removeDiveById(int id); |