Verified Commit ce684e6b authored by Marco Rebhan's avatar Marco Rebhan
Browse files

Update to compile with current KContacts

(see KContacts commit 779da83bcfa42ddc55a17a039e2d9ae9370266d0)
parent 2bb89719
Pipeline #91133 passed with stage
in 3 minutes and 48 seconds
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <KContacts/PhoneNumber> #include <KContacts/PhoneNumber>
#include <KContacts/VCardConverter> #include <KContacts/VCardConverter>
#include <kcontacts_version.h>
#include <KCalUtils/IncidenceFormatter> #include <KCalUtils/IncidenceFormatter>
#include <KCalendarCore/Calendar> #include <KCalendarCore/Calendar>
...@@ -311,9 +312,17 @@ QString KTnef::msTNEFToVPart(const QByteArray &tnef) ...@@ -311,9 +312,17 @@ QString KTnef::msTNEFToVPart(const QByteArray &tnef)
} else if (bCompatClassNote || QLatin1String("IPM.CONTACT") == msgClass) { } else if (bCompatClassNote || QLatin1String("IPM.CONTACT") == msgClass) {
addressee.setUid(stringProp(tnefMsg, attMSGID)); addressee.setUid(stringProp(tnefMsg, attMSGID));
addressee.setFormattedName(stringProp(tnefMsg, MAPI_TAG_PR_DISPLAY_NAME)); addressee.setFormattedName(stringProp(tnefMsg, MAPI_TAG_PR_DISPLAY_NAME));
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL1EMAILADDRESS)), true); addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL1EMAILADDRESS)), true);
addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL2EMAILADDRESS)), false); addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL2EMAILADDRESS)), false);
addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL3EMAILADDRESS)), false); addressee.insertEmail(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL3EMAILADDRESS)), false);
#else
KContacts::Email email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL1EMAILADDRESS)));
email.setPreferred(true);
addressee.addEmail(email);
addressee.addEmail(KContacts::Email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL2EMAILADDRESS))));
addressee.addEmail(KContacts::Email(sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_EMAIL3EMAILADDRESS))));
#endif
addressee.insertCustom(QStringLiteral("KADDRESSBOOK"), addressee.insertCustom(QStringLiteral("KADDRESSBOOK"),
QStringLiteral("X-IMAddress"), QStringLiteral("X-IMAddress"),
sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_IMADDRESS))); sNamedProp(tnefMsg, QStringLiteral(MAPI_TAG_CONTACT_IMADDRESS)));
......
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