Skip to content
GitLab
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
d29b76fc
Commit
d29b76fc
authored
Oct 05, 2022
by
Laurent Montel
Browse files
Initialize variable in headers
parent
1f51ce2a
Pipeline
#241893
passed with stage
in 10 minutes and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/contactpreference/contactpreference.cpp
View file @
d29b76fc
...
...
@@ -10,20 +10,15 @@
using
namespace
MessageComposer
;
ContactPreference
::
ContactPreference
()
:
encryptionPreference
(
Kleo
::
UnknownPreference
)
,
signingPreference
(
Kleo
::
UnknownSigningPreference
)
,
cryptoMessageFormat
(
Kleo
::
AutoFormat
)
{
}
ContactPreference
::
ContactPreference
()
=
default
;
void
ContactPreference
::
fillFromAddressee
(
const
KContacts
::
Addressee
&
contact
)
{
QString
encryptPref
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOENCRYPTPREF"
));
const
QString
encryptPref
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOENCRYPTPREF"
));
encryptionPreference
=
Kleo
::
stringToEncryptionPreference
(
encryptPref
);
QString
signPref
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOSIGNPREF"
));
const
QString
signPref
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOSIGNPREF"
));
signingPreference
=
Kleo
::
stringToSigningPreference
(
signPref
);
QString
cryptoFormats
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOPROTOPREF"
));
const
QString
cryptoFormats
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOPROTOPREF"
));
cryptoMessageFormat
=
Kleo
::
stringToCryptoMessageFormat
(
cryptoFormats
);
pgpKeyFingerprints
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"OPENPGPFP"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
smimeCertFingerprints
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"SMIMEFP"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
...
...
messagecomposer/src/contactpreference/contactpreference.h
View file @
d29b76fc
...
...
@@ -23,10 +23,10 @@ namespace MessageComposer
void
fillFromAddressee
(
const
KContacts
::
Addressee
&
contact
);
void
fillAddressee
(
KContacts
::
Addressee
&
contact
)
const
;
Kleo
::
EncryptionPreference
encryptionPreference
;
Kleo
::
SigningPreference
signingPreference
;
Kleo
::
CryptoMessageFormat
cryptoMessageFormat
;
Kleo
::
EncryptionPreference
encryptionPreference
=
Kleo
::
UnknownPreference
;
Kleo
::
SigningPreference
signingPreference
=
Kleo
::
UnknownSigningPreference
;
Kleo
::
CryptoMessageFormat
cryptoMessageFormat
=
Kleo
::
AutoFormat
;
QStringList
pgpKeyFingerprints
;
QStringList
smimeCertFingerprints
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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