From a6e4cd9f22be063120f45ca7249edb343b3ab27b Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Wed, 13 Oct 2010 19:35:11 +0000 Subject: add getPhotoHash --- examples/GuiClient/vCardCache.cpp | 6 ++++++ examples/GuiClient/vCardCache.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'examples/GuiClient') diff --git a/examples/GuiClient/vCardCache.cpp b/examples/GuiClient/vCardCache.cpp index 85c91993..49396f35 100644 --- a/examples/GuiClient/vCardCache.cpp +++ b/examples/GuiClient/vCardCache.cpp @@ -132,3 +132,9 @@ QImage vCardCache::getAvatar(const QString& bareJid) const else return QImage(); } + +QByteArray vCardCache::getPhotoHash(const QString& bareJid) const +{ + return QCryptographicHash::hash(m_mapBareJidVcard[bareJid].photo(), + QCryptographicHash::Sha1); +} diff --git a/examples/GuiClient/vCardCache.h b/examples/GuiClient/vCardCache.h index 9116142b..4abbd497 100644 --- a/examples/GuiClient/vCardCache.h +++ b/examples/GuiClient/vCardCache.h @@ -46,6 +46,8 @@ public: void loadFromFile(); + QByteArray getPhotoHash(const QString& bareJid) const; + signals: void vCardReadyToUse(const QString& bareJid); -- cgit v1.2.3