Commit d29b76fc authored by Laurent Montel's avatar Laurent Montel
Browse files

Initialize variable in headers

parent 1f51ce2a
Pipeline #241893 passed with stage
in 10 minutes and 59 seconds
......@@ -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);
......
......@@ -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;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment