diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-08 10:28:59 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-08 10:28:59 +0000 |
| commit | 5ab7ebb0462f13259bf9ea6b81e0701640923688 (patch) | |
| tree | b12e07dd48fcd4adacf6811b4c5cd4764e137c48 /examples/GuiClient/mainDialog.cpp | |
| parent | 9828889e6c9a9df47e2b9135d03146353836186d (diff) | |
| download | qxmpp-5ab7ebb0462f13259bf9ea6b81e0701640923688.tar.gz | |
don't use deprecated functions
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
| -rw-r--r-- | examples/GuiClient/mainDialog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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);
}
|
