From 302f3ac6ae3491a5f422646a63ca5f68eab1900b Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 8 Mar 2016 02:25:40 -0300 Subject: Silence warnings in divecomputermodel Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-models/divecomputermodel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 &dcMap, QObject *parent) : CleanerTableModel() +DiveComputerModel::DiveComputerModel(QMultiMap &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 values = dcWorkingMap.values(); DiveComputerNode node = values.at(index.row()); dcWorkingMap.remove(node.model, node); -- cgit v1.2.3-70-g09d2