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 Sieve Editor
Commits
4a17e055
Commit
4a17e055
authored
Nov 13, 2020
by
Laurent Montel
😁
Browse files
Prepare to make it async
parent
9fa09a60
Pipeline
#40782
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/importwizard/checks/importimapsettingsakonadicheckjob.cpp
View file @
4a17e055
...
...
@@ -51,13 +51,22 @@ void ImportImapSettingsAkonadiCheckJob::start()
const
QStringList
fileNames
=
QDir
(
dir
).
entryList
(
QStringList
()
<<
QStringLiteral
(
"*rc"
));
for
(
const
QString
&
file
:
fileNames
)
{
if
(
resourceCanHaveSieveSupport
(
file
))
{
//Move as Async
if
(
importSettings
(
dir
,
file
))
{
mSettingsWereImported
=
true
;
}
mSieveServerLst
.
insert
(
dir
,
file
);
}
}
}
loadSieveServerSettings
();
}
void
ImportImapSettingsAkonadiCheckJob
::
loadSieveServerSettings
()
{
QMapIterator
<
QString
,
QString
>
i
(
mSieveServerLst
);
while
(
i
.
hasNext
())
{
i
.
next
();
if
(
importSettings
(
i
.
key
(),
i
.
value
()))
{
mSettingsWereImported
=
true
;
}
}
checkNoSettingsImported
();
}
...
...
src/importwizard/checks/importimapsettingsakonadicheckjob.h
View file @
4a17e055
...
...
@@ -35,8 +35,10 @@ public:
Q_REQUIRED_RESULT
QString
name
()
const
override
;
private:
inline
bool
resourceCanHaveSieveSupport
(
const
QString
&
filename
)
const
;
bool
importSettings
(
const
QString
&
directory
,
const
QString
&
filename
);
inline
Q_REQUIRED_RESULT
bool
resourceCanHaveSieveSupport
(
const
QString
&
filename
)
const
;
void
loadSieveServerSettings
();
Q_REQUIRED_RESULT
bool
importSettings
(
const
QString
&
directory
,
const
QString
&
filename
);
QMultiMap
<
QString
,
QString
>
mSieveServerLst
;
};
#endif // IMPORTIMAPSETTINGSAKONADICHECKJOB_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