Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
517f2692
Commit
517f2692
authored
Sep 23, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
plugins/messageviewerconfigureplugins/foldersettings/foldersettingfilterproxymodel.cpp
...eplugins/foldersettings/foldersettingfilterproxymodel.cpp
+16
-0
plugins/messageviewerconfigureplugins/foldersettings/foldersettingfilterproxymodel.h
...ureplugins/foldersettings/foldersettingfilterproxymodel.h
+3
-2
No files found.
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
Markdown
is supported
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