From 893234283ce5d470314ec1ea15274a64ca7cfe0e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 5 May 2010 07:18:54 +0000 Subject: fix compilation errors with MS VC2008 --- source/QXmppClient.h | 2 +- source/QXmppTransferManager.cpp | 4 +++- source/QXmppVCard.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/QXmppClient.h b/source/QXmppClient.h index 2c9f6050..f1225356 100644 --- a/source/QXmppClient.h +++ b/source/QXmppClient.h @@ -44,7 +44,7 @@ class QXmppVCardManager; class QXmppInvokable; class QXmppRpcInvokeIq; class QXmppRemoteMethod; -class QXmppRemoteMethodResult; +struct QXmppRemoteMethodResult; class QXmppArchiveManager; class QXmppDiscoveryIq; class QXmppTransferManager; diff --git a/source/QXmppTransferManager.cpp b/source/QXmppTransferManager.cpp index a31be400..5bbf3b22 100644 --- a/source/QXmppTransferManager.cpp +++ b/source/QXmppTransferManager.cpp @@ -284,16 +284,18 @@ void QXmppTransferJob::sendData() return; } - char buffer[m_blockSize]; + char *buffer = new char[m_blockSize]; qint64 length = m_iodevice->read(buffer, m_blockSize); if (length < 0) { + delete [] buffer; terminate(QXmppTransferJob::FileAccessError); return; } if (length > 0) { m_socksSocket->write(buffer, length); + delete [] buffer; m_done += length; emit progress(m_done, fileSize()); } diff --git a/source/QXmppVCard.h b/source/QXmppVCard.h index dce8066f..e59416dd 100644 --- a/source/QXmppVCard.h +++ b/source/QXmppVCard.h @@ -63,7 +63,7 @@ public: QString Q_DECL_DEPRECATED getFullName() const; QString Q_DECL_DEPRECATED getNickName() const; QImage Q_DECL_DEPRECATED getPhotoAsImage() const; - const QByteArray& Q_DECL_DEPRECATED getPhoto() const; + const QByteArray Q_DECL_DEPRECATED & getPhoto() const; // obsolete end private: -- cgit v1.2.3