diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(ECMQtDeclareLoggingCategory) -set(PIM_VERSION "5.3.40") +set(PIM_VERSION "5.3.41") set(KIDENTITYMANAGEMENT_LIB_VERSION ${PIM_VERSION}) set(PIMTEXTEDIT_LIB_VERSION "5.2.80") diff --git a/src/identity.h b/src/identity.h --- a/src/identity.h +++ b/src/identity.h @@ -70,6 +70,7 @@ static const char s_autocorrectionLanguage[] = "Autocorrection Language"; static const char s_disabledFcc[] = "Disable Fcc"; static const char s_pgpautosign[] = "Pgp Auto Sign"; +static const char s_pgpautoencrypt[] = "Pgp Auto Encrypt"; static const char s_defaultDomainName[] = "Default Domain"; KIDENTITYMANAGEMENT_EXPORT QDataStream &operator<< @@ -234,6 +235,12 @@ void setPgpAutoSign(bool); /** + * @since 5.4 + */ + bool pgpAutoEncrypt() const; + void setPgpAutoEncrypt(bool); + + /** * @since 4.14 */ QString defaultDomainName() const; diff --git a/src/identity.cpp b/src/identity.cpp --- a/src/identity.cpp +++ b/src/identity.cpp @@ -188,6 +188,7 @@ << i.autocorrectionLanguage() << i.disabledFcc() << i.pgpAutoSign() + << i.pgpAutoEncrypt() << i.defaultDomainName(); } @@ -222,6 +223,7 @@ >> i.mPropertiesMap[QLatin1String(s_autocorrectionLanguage)] >> i.mPropertiesMap[QLatin1String(s_disabledFcc)] >> i.mPropertiesMap[QLatin1String(s_pgpautosign)] + >> i.mPropertiesMap[QLatin1String(s_pgpautoencrypt)] >> i.mPropertiesMap[QLatin1String(s_defaultDomainName)]; i.setProperty(QLatin1String(s_uoid), uoid); @@ -689,6 +691,21 @@ setProperty(QLatin1String(s_pgpautosign), autoSign); } +bool Identity::pgpAutoEncrypt() const +{ + const QVariant var = property(QLatin1String(s_pgpautoencrypt)); + if (var.isNull()) { + return false; + } else { + return var.toBool(); + } +} + +void Identity::setPgpAutoEncrypt(bool autoEncrypt) +{ + setProperty(QLatin1String(s_pgpautoencrypt), autoEncrypt); +} + QString Identity::defaultDomainName() const { return property(QLatin1String(s_defaultDomainName)).toString();