diff --git a/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.h b/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.h --- a/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.h +++ b/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.h @@ -55,9 +55,6 @@ Q_PROPERTY(QString formattedBirthday READ formattedBirthday) Q_PROPERTY(QString formattedAnniversary READ formattedAnniversary) - // ### this is temporary, until KContacts::Impp takes over this part - Q_PROPERTY(QVariantList imAddresses READ imAddresses) - public: ContactGrantleeWrapper(); ContactGrantleeWrapper(const KContacts::Addressee &addr); diff --git a/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.cpp b/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.cpp --- a/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.cpp +++ b/kaddressbookgrantlee/src/contactobject/contactgrantleewrapper.cpp @@ -19,8 +19,6 @@ #include "contactgrantleewrapper.h" -#include - #include #include @@ -135,30 +133,4 @@ return QLocale().toString(anniversary()); } -static QVariantHash imAddressHash(const QString &typeKey, const QString &imAddress) -{ - QVariantHash addressObject; - addressObject.insert(QStringLiteral("serviceLabel"), IMProtocols::self()->name(typeKey)); - addressObject.insert(QStringLiteral("address"), imAddress); - addressObject.insert(QStringLiteral("serviceIcon"), IMProtocols::self()->icon(typeKey)); - return addressObject; -} - -QVariantList ContactGrantleeWrapper::imAddresses() const -{ - QVariantList imAddrs; - const QStringList customs = this->customs(); - for (const QString &custom : customs) { - if (custom.startsWith(QLatin1String("messaging/"))) { - const int pos = custom.indexOf(QLatin1Char(':')); - QString key = custom.left(pos); - key.remove(QStringLiteral("-All")); - const QString value = custom.mid(pos + 1); - imAddrs.append(imAddressHash(key, value)); - } - } - - return imAddrs; -} - #include "moc_contactgrantleewrapper.cpp" diff --git a/kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp b/kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp --- a/kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp +++ b/kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp @@ -59,13 +59,16 @@ GRANTLEE_MAKE_GADGET(KContacts::Address) GRANTLEE_MAKE_GADGET(KContacts::Email) +GRANTLEE_MAKE_GADGET(KContacts::Impp) GRANTLEE_MAKE_GADGET(KContacts::PhoneNumber) GRANTLEE_MAKE_GADGET(KContacts::ResourceLocatorUrl) GRANTLEE_MAKE_GADGET(KAddressBookGrantlee::ContactGrantleeWrapper) GRANTLEE_BEGIN_LOOKUP(QUrl) if (property == QLatin1String("scheme")) { return object.scheme(); +} else if (property == QLatin1String("path")) { + return object.path(); } GRANTLEE_END_LOOKUP @@ -121,6 +124,7 @@ { Grantlee::registerMetaType(); Grantlee::registerMetaType(); + Grantlee::registerMetaType(); Grantlee::registerMetaType(); Grantlee::registerMetaType(); Grantlee::registerMetaType();