From 91eb0d8db8dbfd5f427f901bb312302d39fdae4d Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Thu, 14 Oct 2010 06:49:47 +0000 Subject: use a fresh object --- examples/GuiClient/mainDialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/GuiClient/mainDialog.cpp') 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); -- cgit v1.2.3