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>
This commit is contained in:
Tomaz Canabrava 2015-01-06 16:40:51 -02:00 committed by Dirk Hohndel
parent 74596cc193
commit af13ba7d44

View file

@ -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