mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-08 01:56:17 +00:00
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:
parent
74596cc193
commit
af13ba7d44
1 changed files with 6 additions and 1 deletions
|
@ -151,7 +151,12 @@ ColumnNameResult::ColumnNameResult(QObject *parent)
|
||||||
|
|
||||||
bool ColumnNameResult::setData(const QModelIndex &index, const QVariant &value, int role)
|
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
|
QVariant ColumnNameResult::data(const QModelIndex &index, int role) const
|
||||||
|
|
Loading…
Add table
Reference in a new issue