summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divelocationmodel.cpp15
-rw-r--r--qt-models/divelocationmodel.h1
2 files changed, 0 insertions, 16 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())
diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h
index 404b66f48..2abd894ea 100644
--- a/qt-models/divelocationmodel.h
+++ b/qt-models/divelocationmodel.h
@@ -24,7 +24,6 @@ public:
int columnCount(const QModelIndex &parent) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
void setFirstRowTextField(QLineEdit *textField);