Impelmented the Data method for BuddyFilter

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-10-31 16:23:20 -02:00 committed by Dirk Hohndel
parent 7c4ddcbf7a
commit 1f9abad852

View file

@ -2379,7 +2379,12 @@ void BuddyFilterModel::repopulate()
QVariant BuddyFilterModel::data(const QModelIndex &index, int role) const
{
return QStringListModel::data(index, role);
if (role == Qt::CheckStateRole) {
return checkState[index.row()] ? Qt::Checked : Qt::Unchecked;
} else if (role == Qt::DisplayRole) {
return stringList()[index.row()];
}
return QVariant();
}