Changeset View
Changeset View
Standalone View
Standalone View
src/core/models/entityrightsfiltermodel.cpp
Context not available. | |||||
19 | */ | 19 | */ | ||
---|---|---|---|---|---|
20 | 20 | | |||
21 | #include "entityrightsfiltermodel.h" | 21 | #include "entityrightsfiltermodel.h" | ||
22 | | ||||
23 | #include "entitytreemodel.h" | 22 | #include "entitytreemodel.h" | ||
24 | 23 | | |||
25 | | ||||
26 | using namespace Akonadi; | 24 | using namespace Akonadi; | ||
27 | 25 | | |||
28 | namespace Akonadi | 26 | namespace Akonadi | ||
Context not available. | |||||
70 | } | 68 | } | ||
71 | 69 | | |||
72 | EntityRightsFilterModel::EntityRightsFilterModel(QObject *parent) | 70 | EntityRightsFilterModel::EntityRightsFilterModel(QObject *parent) | ||
73 | : KRecursiveFilterProxyModel(parent) | 71 | : QSortFilterProxyModel(parent) | ||
74 | , d_ptr(new EntityRightsFilterModelPrivate(this)) | 72 | , d_ptr(new EntityRightsFilterModelPrivate(this)) | ||
75 | { | 73 | { | ||
74 | setRecursiveFilteringEnabled(true); | ||||
76 | } | 75 | } | ||
77 | 76 | | |||
78 | EntityRightsFilterModel::~EntityRightsFilterModel() | 77 | EntityRightsFilterModel::~EntityRightsFilterModel() | ||
Context not available. | |||||
107 | Q_D(const EntityRightsFilterModel); | 106 | Q_D(const EntityRightsFilterModel); | ||
108 | 107 | | |||
109 | if (d->rightsMatches(index)) { | 108 | if (d->rightsMatches(index)) { | ||
110 | return KRecursiveFilterProxyModel::flags(index); | 109 | return QSortFilterProxyModel::flags(index); | ||
111 | } else { | 110 | } else { | ||
112 | return KRecursiveFilterProxyModel::flags(index) & ~(Qt::ItemIsSelectable | Qt::ItemIsEnabled); | 111 | return QSortFilterProxyModel::flags(index) & ~(Qt::ItemIsSelectable | Qt::ItemIsEnabled); | ||
113 | } | 112 | } | ||
114 | } | 113 | } | ||
115 | 114 | | |||
Context not available. |