Fix compiler warnings in QtNetwork.

- Initialization order in QHttpNetworkConnectionChannel
- Potential use of uninitialized value in QNetworkReplyDataImpl

Change-Id: Ia405147ef81a3f1509149349d6b5b01bb078f853
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-01-04 09:42:07 +01:00 committed by Qt by Nokia
parent a793a56d70
commit 8ed53babb9
2 changed files with 2 additions and 3 deletions

View File

@ -73,10 +73,10 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
, lastStatus(0)
, pendingEncrypt(false)
, reconnectAttempts(2)
, authenticationCredentialsSent(false)
, proxyCredentialsSent(false)
, authMethod(QAuthenticatorPrivate::None)
, proxyAuthMethod(QAuthenticatorPrivate::None)
, authenticationCredentialsSent(false)
, proxyCredentialsSent(false)
#ifndef QT_NO_OPENSSL
, ignoreAllSslErrors(false)
#endif

View File

@ -73,7 +73,6 @@ QNetworkReplyDataImpl::QNetworkReplyDataImpl(QObject *parent, const QNetworkRequ
QString mimeType;
QByteArray payload;
if (qDecodeDataUrl(url, mimeType, payload)) {
QString &mimeType = mimeType;
qint64 size = payload.size();
setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
setHeader(QNetworkRequest::ContentLengthHeader, size);