From 4e4a0da3b7cb002a1cb049cf3221d730f463971a Mon Sep 17 00:00:00 2001 From: Camila San Date: Tue, 17 Apr 2018 19:01:21 +0200 Subject: [PATCH] Returns the activity type to the list view. Signed-off-by: Camila San --- src/gui/activitydata.h | 1 + src/gui/activityitemdelegate.h | 1 + src/gui/activitylistmodel.cpp | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/src/gui/activitydata.h b/src/gui/activitydata.h index 3039cb8746..ca2e00e4a1 100644 --- a/src/gui/activitydata.h +++ b/src/gui/activitydata.h @@ -85,6 +85,7 @@ bool operator<(const Activity &rhs, const Activity &lhs); typedef QList ActivityList; } +Q_DECLARE_METATYPE(OCC::Activity::Type) Q_DECLARE_METATYPE(OCC::ActivityLink) #endif // ACTIVITYDATA_H diff --git a/src/gui/activityitemdelegate.h b/src/gui/activityitemdelegate.h index 7847a03172..844a12d516 100644 --- a/src/gui/activityitemdelegate.h +++ b/src/gui/activityitemdelegate.h @@ -31,6 +31,7 @@ public: AccountRole, ActionsLinksRole, ActionTextRole, + ActionRole, MessageRole, PathRole, LinkRole, diff --git a/src/gui/activitylistmodel.cpp b/src/gui/activitylistmodel.cpp index 4007f85626..6519f11909 100644 --- a/src/gui/activitylistmodel.cpp +++ b/src/gui/activitylistmodel.cpp @@ -87,6 +87,12 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const return QIcon(QLatin1String(":/client/resources/activity.png")); return QVariant(); break; + case ActivityItemDelegate::ActionRole:{ + QVariant type; + type.setValue(a._type); + return type; + break; + } case Qt::ToolTipRole: case ActivityItemDelegate::ActionTextRole: return a._subject;