diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-06 16:40:51 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-06 19:38:00 -0800 |
commit | af13ba7d443ecfaa16025ad7c74ecfadb46f807f (patch) | |
tree | 44ee74105e412d734b5760c5a9267066e5f925d2 /qt-ui/divelogimportdialog.cpp | |
parent | 74596cc19399f0f2444e73021b8ec4ebbf43813f (diff) | |
download | subsurface-af13ba7d443ecfaa16025ad7c74ecfadb46f807f.tar.gz |
Add setData() to the ColumnResult model
This way the drop target will work when implemented.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 6f61ac2db..73b2e5631 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -151,7 +151,12 @@ ColumnNameResult::ColumnNameResult(QObject *parent) bool ColumnNameResult::setData(const QModelIndex &index, const QVariant &value, int role) { - + if (!index.isValid() || index.row() != 0) + return false; + if (role == Qt::EditRole) { + columnNames[index.column()] = value.toString(); + dataChanged(index, index); + } } QVariant ColumnNameResult::data(const QModelIndex &index, int role) const |