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
PIM Messagelib
Commits
7ab1f813
Commit
7ab1f813
authored
Jun 01, 2021
by
Laurent Montel
😁
Browse files
Prepare to build save filter
parent
d9d0527e
Pipeline
#63795
passed with stage
in 40 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagelist/src/core/filtersavedmanager.cpp
View file @
7ab1f813
...
...
@@ -63,5 +63,26 @@ QVector<FilterSavedManager::FilterInfo> FilterSavedManager::filterInfos() const
void
FilterSavedManager
::
removeFilter
(
const
QString
&
identifier
)
{
KConfigGroup
grp
(
KSharedConfig
::
openConfig
(),
"General"
);
const
int
numberFilter
=
grp
.
readEntry
(
"NumberFilter"
).
toInt
();
QVector
<
Filter
*>
lst
;
lst
.
reserve
(
numberFilter
);
for
(
int
i
=
0
;
i
<
numberFilter
;
++
i
)
{
Filter
*
f
=
Filter
::
load
(
KSharedConfig
::
openConfig
(),
i
);
lst
<<
f
;
}
int
numberOfFilter
=
0
;
for
(
Filter
*
f
:
qAsConst
(
lst
))
{
#if 0
if (f->identifier != identifier) {
f->save(KSharedConfig::openConfig(), f->name());
numberOfFilter++;
}
#endif
}
// TODO save number of filter
qDeleteAll
(
lst
);
lst
.
clear
();
// TODO load filter + remove specific filter + delete it
}
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