Mercurial > hg > svcore
comparison data/model/ModelDataTableModel.cpp @ 1365:3382d914e110
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Fri, 13 Jan 2017 10:29:44 +0000 |
parents | cbdd534f517a |
children | ec9e65fcf749 |
comparison
equal
deleted
inserted
replaced
1272:6a7ea3bd0e10 | 1365:3382d914e110 |
---|---|
45 ModelDataTableModel::data(const QModelIndex &index, int role) const | 45 ModelDataTableModel::data(const QModelIndex &index, int role) const |
46 { | 46 { |
47 if (!m_model) return QVariant(); | 47 if (!m_model) return QVariant(); |
48 if (role != Qt::EditRole && role != Qt::DisplayRole) return QVariant(); | 48 if (role != Qt::EditRole && role != Qt::DisplayRole) return QVariant(); |
49 if (!index.isValid()) return QVariant(); | 49 if (!index.isValid()) return QVariant(); |
50 return m_model->getData(getUnsorted(index.row()), index.column(), role); | 50 QVariant d = m_model->getData(getUnsorted(index.row()), index.column(), role); |
51 return d; | |
51 } | 52 } |
52 | 53 |
53 bool | 54 bool |
54 ModelDataTableModel::setData(const QModelIndex &index, const QVariant &value, int role) | 55 ModelDataTableModel::setData(const QModelIndex &index, const QVariant &value, int role) |
55 { | 56 { |