summaryrefslogtreecommitdiffstats
path: root/framework/src
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src')
-rw-r--r--framework/src/domain/folderlistmodel.cpp6
-rw-r--r--framework/src/domain/folderlistmodel.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/framework/src/domain/folderlistmodel.cpp b/framework/src/domain/folderlistmodel.cpp
index 14405beb..4437e75b 100644
--- a/framework/src/domain/folderlistmodel.cpp
+++ b/framework/src/domain/folderlistmodel.cpp
@@ -53,6 +53,7 @@ QHash< int, QByteArray > FolderListModel::roleNames() const
53 roles[Id] = "id"; 53 roles[Id] = "id";
54 roles[DomainObject] = "domainObject"; 54 roles[DomainObject] = "domainObject";
55 roles[Status] = "status"; 55 roles[Status] = "status";
56 roles[Trash] = "trash";
56 57
57 return roles; 58 return roles;
58} 59}
@@ -81,6 +82,11 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const
81 } 82 }
82 return NoStatus; 83 return NoStatus;
83 } 84 }
85 case Trash:
86 if (folder) {
87 return folder->getSpecialPurpose().contains(Sink::ApplicationDomain::SpecialPurpose::Mail::trash);
88 }
89 return false;
84 } 90 }
85 return QSortFilterProxyModel::data(idx, role); 91 return QSortFilterProxyModel::data(idx, role);
86} 92}
diff --git a/framework/src/domain/folderlistmodel.h b/framework/src/domain/folderlistmodel.h
index 17645bb5..8f157ca2 100644
--- a/framework/src/domain/folderlistmodel.h
+++ b/framework/src/domain/folderlistmodel.h
@@ -54,7 +54,8 @@ public:
54 Icon, 54 Icon,
55 Id, 55 Id,
56 DomainObject, 56 DomainObject,
57 Status 57 Status,
58 Trash
58 }; 59 };
59 Q_ENUMS(Roles) 60 Q_ENUMS(Roles)
60 61