From d914dd97444c552a374b6f893851d4e5ac1e08dc Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 8 Feb 2015 10:17:59 +0100 Subject: [PATCH] Extract tags from the model using TagRole --- src/model/danboorupostmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/model/danboorupostmodel.cpp b/src/model/danboorupostmodel.cpp index 3139f50..332a9b0 100644 --- a/src/model/danboorupostmodel.cpp +++ b/src/model/danboorupostmodel.cpp @@ -107,6 +107,12 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const return QSize(post->width(), post->height()); case RatingRole: return post->rating(); + case TagRole: + { + QVariant variant; + variant.setValue(post->tags()); + return variant; + } default: return QVariant(); }