diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-10-31 16:23:20 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-31 14:58:55 -0700 |
commit | 1f9abad8529691ab86e8f4a5027aa6f679ba622c (patch) | |
tree | 321a71bebdabafebd698ee30ad5d1b0da56ff00f /qt-ui/models.cpp | |
parent | 7c4ddcbf7ac0fd587f31f22bcefba7ab2f488cb0 (diff) | |
download | subsurface-1f9abad8529691ab86e8f4a5027aa6f679ba622c.tar.gz |
Impelmented the Data method for BuddyFilter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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(); } |