diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-09 08:59:18 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-09 21:00:44 -0700 |
commit | 65ca3444f5429c5189e53c3a83d799e7b37b38aa (patch) | |
tree | 35fdcd62009c6b9d4e7836f3e6c489a4fe5592c2 /qt-models/divelocationmodel.cpp | |
parent | 43e6359f40b92103a0d5d91ffbeddef19bf4c5ac (diff) | |
download | subsurface-65ca3444f5429c5189e53c3a83d799e7b37b38aa.tar.gz |
Dive sites: remove LocationInformationModel::setData() function
Editing of dive sites does not work via this model and the function
was broken anyway (it didn't subtract 2 from the index).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 2e62997f9..33a508bfd 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -137,21 +137,6 @@ QStringList LocationInformationModel::allSiteNames() const return locationNames; } -bool LocationInformationModel::setData(const QModelIndex &index, const QVariant &value, int role) -{ - if (!index.isValid() || index.row() < 2) - return false; - - if (role != Qt::EditRole) - return false; - - struct dive_site *ds = get_dive_site(index.row()); - free(ds->name); - ds->name = copy_qstring(value.toString()); - emit dataChanged(index, index); - return true; -} - bool LocationInformationModel::removeRows(int row, int, const QModelIndex&) { if(row >= rowCount()) |