From f0e9eb6f6b4bd57532966310e1fdf88ee4f1eb53 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 15 Aug 2021 00:00:58 +0000 Subject: Add DcContact::getProfileImage --- contact.cpp | 9 +++++++++ contact.h | 1 + 2 files changed, 10 insertions(+) diff --git a/contact.cpp b/contact.cpp index db6a887..f51a666 100644 --- a/contact.cpp +++ b/contact.cpp @@ -49,6 +49,15 @@ DcContact::getDisplayName() return result; } +QString +DcContact::getProfileImage() +{ + char *profileImage = dc_contact_get_profile_image(m_contact); + QString result{profileImage}; + dc_str_unref(profileImage); + return result; +} + QColor DcContact::getColor() { diff --git a/contact.h b/contact.h index e309b43..82a6e00 100644 --- a/contact.h +++ b/contact.h @@ -22,6 +22,7 @@ public: QString getAddr(); QString getName(); QString getDisplayName(); + Q_INVOKABLE QString getProfileImage(); QColor getColor(); private: -- cgit v1.2.3-54-g00ecf