diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-03-08 02:25:40 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-08 20:58:21 -0800 |
commit | 302f3ac6ae3491a5f422646a63ca5f68eab1900b (patch) | |
tree | e25b40a52f97ec8a9da392c50727c3c17af2181d /qt-models/divecomputermodel.cpp | |
parent | 14ad5b0bd28e721954a8b54a29353266b790cd24 (diff) | |
download | subsurface-302f3ac6ae3491a5f422646a63ca5f68eab1900b.tar.gz |
Silence warnings in divecomputermodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/divecomputermodel.cpp')
-rw-r--r-- | qt-models/divecomputermodel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-models/divecomputermodel.cpp b/qt-models/divecomputermodel.cpp index 51b1a767b..7b87d872d 100644 --- a/qt-models/divecomputermodel.cpp +++ b/qt-models/divecomputermodel.cpp @@ -2,7 +2,7 @@ #include "dive.h" #include "divelist.h" -DiveComputerModel::DiveComputerModel(QMultiMap<QString, DiveComputerNode> &dcMap, QObject *parent) : CleanerTableModel() +DiveComputerModel::DiveComputerModel(QMultiMap<QString, DiveComputerNode> &dcMap, QObject *parent) : CleanerTableModel(parent) { setHeaderDataStrings(QStringList() << "" << tr("Model") << tr("Device ID") << tr("Nickname")); dcWorkingMap = dcMap; @@ -78,6 +78,10 @@ Qt::ItemFlags DiveComputerModel::flags(const QModelIndex &index) const bool DiveComputerModel::setData(const QModelIndex &index, const QVariant &value, int role) { + // We should test if the role == Qt::EditRole + Q_UNUSED(role); + + // WARN: This seems wrong - The values don't are ordered - we need a map from the Key to Index, or something. QList<DiveComputerNode> values = dcWorkingMap.values(); DiveComputerNode node = values.at(index.row()); dcWorkingMap.remove(node.model, node); |