summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Klapetek <mklapetek@kde.org>2016-02-23 23:24:33 (GMT)
committerAlexandr Akulich <akulichalexander@gmail.com>2016-09-21 13:05:33 (GMT)
commitc0bd88ef554105375d4f8a12a32cf963c0aefb00 (patch)
tree9ecbb531dab589683d6ea64e8be4fc7fdd6474b5
parentf053d76283b1955c4f37bf8fb5ce571af5bb9d27 (diff)
[kpeople] Add dedicated property for account display name
Reviewed-by: Alexandr Akulich <akulichalexander@gmail.com>
-rw-r--r--KTp/types.h1
-rw-r--r--kpeople/datasourceplugin/im-persons-data-source.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/KTp/types.h b/KTp/types.h
index 27eb897..8d3ca4f 100644
--- a/KTp/types.h
+++ b/KTp/types.h
@@ -93,6 +93,7 @@ namespace KTp
}
static const QString S_KPEOPLE_PROPERTY_ACCOUNT_PATH = QStringLiteral("telepathy-accountPath");
+static const QString S_KPEOPLE_PROPERTY_ACCOUNT_DISPLAY_NAME = QStringLiteral("telepathy-accountDisplayName");
static const QString S_KPEOPLE_PROPERTY_CONTACT_ID = QStringLiteral("telepathy-contactId");
static const QString S_KPEOPLE_PROPERTY_CONTACT_URI = QStringLiteral("telepathy-contactUri");
static const QString S_KPEOPLE_PROPERTY_PRESENCE = QStringLiteral("telepathy-presence");
diff --git a/kpeople/datasourceplugin/im-persons-data-source.cpp b/kpeople/datasourceplugin/im-persons-data-source.cpp
index 05eb840..51037c9 100644
--- a/kpeople/datasourceplugin/im-persons-data-source.cpp
+++ b/kpeople/datasourceplugin/im-persons-data-source.cpp
@@ -87,6 +87,8 @@ public:
return s_presenceStrings.value(m_contact->presence().type());
else if (key == AbstractContact::PictureProperty)
return m_contact->avatarPixmap();
+ else if (key == S_KPEOPLE_PROPERTY_ACCOUNT_DISPLAY_NAME)
+ return m_account->displayName();
}
return m_properties[key];
}