diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-27 16:53:13 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-29 13:06:39 -0700 |
commit | cab0147093b829d971ca0a1ce92e9d881440311f (patch) | |
tree | 0157ddfb367fa6d8a29fdaf02f3c9a100d413a9a /qt-models/weightsysteminfomodel.h | |
parent | 36d8dcc3bf9b4d31d86d2b739196dd52ebf226f2 (diff) | |
download | subsurface-cab0147093b829d971ca0a1ce92e9d881440311f.tar.gz |
Cleanup: implement proper Qt-model semantics in WeightInfoModel
- Use a beginResetModel()/endResetModel() pair instead of distinct
addRows / removeRows pairs.
- Reuse the update function in the constructor().
- Let "rows" be the number of rows, not the number of rows minus one.
- Remove updateInfo() function as it does the same as update().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/weightsysteminfomodel.h')
-rw-r--r-- | qt-models/weightsysteminfomodel.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/qt-models/weightsysteminfomodel.h b/qt-models/weightsysteminfomodel.h index 6aeb59262..6e572f337 100644 --- a/qt-models/weightsysteminfomodel.h +++ b/qt-models/weightsysteminfomodel.h @@ -22,7 +22,6 @@ public: bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; void clear(); void update(); - void updateInfo(); private: int rows; |