From 1f9abad8529691ab86e8f4a5027aa6f679ba622c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 31 Oct 2014 16:23:20 -0200 Subject: Impelmented the Data method for BuddyFilter Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 4972fbf00..faf22de51 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -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(); } -- cgit v1.2.3-70-g09d2