From 5ab7ebb0462f13259bf9ea6b81e0701640923688 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Wed, 8 Sep 2010 10:28:59 +0000 Subject: don't use deprecated functions --- examples/GuiClient/mainDialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/GuiClient/mainDialog.cpp') diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp index e9adfce2..e8c53f73 100644 --- a/examples/GuiClient/mainDialog.cpp +++ b/examples/GuiClient/mainDialog.cpp @@ -304,7 +304,13 @@ void mainDialog::avatarChanged(const QImage& image) { QXmppVCardIq vcard; vcard.setType(QXmppIq::Set); - vcard.setPhoto(image); + + QByteArray ba; + QBuffer buffer(&ba); + buffer.open(QIODevice::WriteOnly); + image.save(&buffer, "PNG"); + vcard.setPhoto(ba); + m_xmppClient.sendPacket(vcard); m_statusWidget.setAvatar(image); } -- cgit v1.2.3