aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/mainDialog.cpp
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-14 06:49:47 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-14 06:49:47 +0000
commit91eb0d8db8dbfd5f427f901bb312302d39fdae4d (patch)
tree0c4d407a7c4c25f5e92abc48ccfab05e6d65178c /examples/GuiClient/mainDialog.cpp
parent207f28a8704a7d713373c8277f9fa23cd29f6eb3 (diff)
downloadqxmpp-91eb0d8db8dbfd5f427f901bb312302d39fdae4d.tar.gz
use a fresh object
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
-rw-r--r--examples/GuiClient/mainDialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp
index 9cc74097..258af314 100644
--- a/examples/GuiClient/mainDialog.cpp
+++ b/examples/GuiClient/mainDialog.cpp
@@ -412,7 +412,7 @@ void mainDialog::presenceStatusTypeChanged(QXmppPresence::Status::Type statusTyp
void mainDialog::avatarChanged(const QImage& image)
{
- QXmppVCardIq& vcard = m_vCardCache.getVCard(m_xmppClient.configuration().jidBare());
+ QXmppVCardIq vcard;
vcard.setType(QXmppIq::Set);
QByteArray ba;
@@ -425,6 +425,7 @@ void mainDialog::avatarChanged(const QImage& image)
m_xmppClient.sendPacket(vcard);
m_statusWidget.setAvatar(image);
+ m_vCardCache.getVCard(m_xmppClient.configuration().jidBare()) = vcard;
// update photo hash
QXmppPresence presence = m_xmppClient.clientPresence();
addPhotoHash(presence);