mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
7c4ddcbf7a
commit
1f9abad852
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue