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
efb12fbe
Commit
efb12fbe
authored
Mar 07, 2021
by
Laurent Montel
😁
Browse files
Allow to update value
parent
a62f6b8c
Pipeline
#53400
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messageviewer/src/dkim-verify/dkimchecksignaturejob.cpp
View file @
efb12fbe
...
...
@@ -199,6 +199,7 @@ void DKIMCheckSignatureJob::start()
downloadKey
(
mDkimInfo
);
}
else
{
parseDKIMKeyRecord
(
keyValue
,
mDkimInfo
.
domain
(),
mDkimInfo
.
selector
(),
false
);
MessageViewer
::
DKIMManagerKey
::
self
()
->
updateLastUsed
(
mDkimInfo
.
domain
(),
mDkimInfo
.
selector
());
}
}
else
{
downloadKey
(
mDkimInfo
);
...
...
messageviewer/src/dkim-verify/dkimmanagerkey.cpp
View file @
efb12fbe
...
...
@@ -40,6 +40,18 @@ QString DKIMManagerKey::keyValue(const QString &selector, const QString &domain)
return
{};
}
void
DKIMManagerKey
::
updateLastUsed
(
const
QString
&
selector
,
const
QString
&
domain
)
{
for
(
const
KeyInfo
&
keyInfo
:
qAsConst
(
mKeys
))
{
if
(
keyInfo
.
selector
==
selector
&&
keyInfo
.
domain
==
domain
)
{
KeyInfo
newKey
=
keyInfo
;
newKey
.
lastUsedDateTime
=
QDateTime
::
currentDateTime
();
addKey
(
newKey
);
return
;
}
}
}
void
DKIMManagerKey
::
addKey
(
const
KeyInfo
&
key
)
{
const
QVector
<
KeyInfo
>
keys
=
mKeys
;
...
...
messageviewer/src/dkim-verify/dkimmanagerkey.h
View file @
efb12fbe
...
...
@@ -70,6 +70,8 @@ public:
void
saveKeys
();
Q_REQUIRED_RESULT
QString
keyValue
(
const
QString
&
selector
,
const
QString
&
domain
);
void
updateLastUsed
(
const
QString
&
selector
,
const
QString
&
domain
);
private:
Q_REQUIRED_RESULT
QStringList
keyRecorderList
(
KSharedConfig
::
Ptr
&
config
)
const
;
QVector
<
KeyInfo
>
mKeys
;
...
...
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