Mercurial > retraceit
diff src/filterwidget.cpp @ 17:73efe717b944
Fix bug in csv model to allow changing headerdata
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Apr 2015 18:55:55 +0200 |
parents | 315e6988952a |
children | e12284a222ba |
line wrap: on
line diff
--- a/src/filterwidget.cpp Tue Apr 14 17:25:44 2015 +0200 +++ b/src/filterwidget.cpp Tue Apr 14 18:55:55 2015 +0200 @@ -36,9 +36,9 @@ mCombo->addItem(entry); mColFilterMap.insert(addedItems++, i); } else { - QString shortended = entry.remove(0,1); - // TODO this does not work as expected - newSource->setHeaderData(i, Qt::Horizontal, shortended); + if (!newSource->setHeaderData(i, Qt::Horizontal, entry.remove(0,1), Qt::DisplayRole)) { + qDebug() << "Setting header data failed."; + } } } }