Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
517f2692
Commit
517f2692
authored
Sep 23, 2020
by
Laurent Montel
😁
Browse files
Store collection
parent
a97ea4c2
Pipeline
#35346
failed with stage
in 105 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerconfigureplugins/foldersettings/foldersettingfilterproxymodel.cpp
View file @
517f2692
...
...
@@ -39,3 +39,19 @@ Qt::ItemFlags FolderSettingFilterProxyModel::flags(const QModelIndex &index) con
return
QSortFilterProxyModel
::
flags
(
index
);
}
}
bool
FolderSettingFilterProxyModel
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
if
(
role
==
Qt
::
CheckStateRole
)
{
if
(
index
.
isValid
())
{
const
Akonadi
::
Collection
collection
=
data
(
index
,
Akonadi
::
EntityTreeModel
::
CollectionRole
).
value
<
Akonadi
::
Collection
>
();
//mNotificationCollection[collection] = (value == Qt::Checked);
qDebug
()
<<
" collectionId "
<<
collection
.
id
();
Q_EMIT
dataChanged
(
index
,
index
);
//return true;
}
}
return
QSortFilterProxyModel
::
setData
(
index
,
value
,
role
);
}
plugins/messageviewerconfigureplugins/foldersettings/foldersettingfilterproxymodel.h
View file @
517f2692
...
...
@@ -16,9 +16,10 @@ public:
explicit
FolderSettingFilterProxyModel
(
QObject
*
parent
=
nullptr
);
~
FolderSettingFilterProxyModel
();
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
override
;
Q_REQUIRED_RESULT
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
override
;
bool
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
override
;
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
override
;
Q_REQUIRED_RESULT
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
override
;
};
#endif // FOLDERSETTINGFILTERPROXYMODEL_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment