aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/vCardCache.cpp
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-13 20:08:45 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-13 20:08:45 +0000
commit9910064be2b7719b662beb837461f879ff4e7a78 (patch)
treec259a3adfdc2ecd63763800de530f133c0ec2961 /examples/GuiClient/vCardCache.cpp
parent2a99a72baae2dcb1085424c91d11ea1bc0781c89 (diff)
downloadqxmpp-9910064be2b7719b662beb837461f879ff4e7a78.tar.gz
if the photo is empty return QByteArray() otherwise it generates a non null value
Diffstat (limited to 'examples/GuiClient/vCardCache.cpp')
-rw-r--r--examples/GuiClient/vCardCache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/GuiClient/vCardCache.cpp b/examples/GuiClient/vCardCache.cpp
index 49396f35..a9158ca1 100644
--- a/examples/GuiClient/vCardCache.cpp
+++ b/examples/GuiClient/vCardCache.cpp
@@ -135,6 +135,9 @@ QImage vCardCache::getAvatar(const QString& bareJid) const
QByteArray vCardCache::getPhotoHash(const QString& bareJid) const
{
- return QCryptographicHash::hash(m_mapBareJidVcard[bareJid].photo(),
+ if(m_mapBareJidVcard[bareJid].photo().isEmpty())
+ return QByteArray();
+ else
+ return QCryptographicHash::hash(m_mapBareJidVcard[bareJid].photo(),
QCryptographicHash::Sha1);
}