diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-04-12 17:32:18 +0200 |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2011-05-03 16:43:54 +0200 |
commit | 6d3044db9578d14b11dc7d156e2d81709c3d0ed7 (patch) | |
tree | 1fcbf0ae9592536cd22e319c20a9b1a7cf29abaf /src/network/access | |
parent | b68f29720ad040ebeb4a7ed05676b6768fa4d49a (diff) |
QNAM: Fix initialization order warnings
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 50 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl_p.h | 39 |
2 files changed, 54 insertions, 35 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index d240fb8ab2..fcfa1bb7ea 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -244,6 +244,7 @@ QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(QNetworkAccessManager* const manage QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl() { + // FIXME? } void QNetworkReplyHttpImpl::close() @@ -361,26 +362,41 @@ bool QNetworkReplyHttpImpl::canReadLine () const QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate() // FIXME order etc : QNetworkReplyPrivate() + + , manager(0) + , managerPrivate(0) + , synchronous(false) + + , state(Idle) + , statusCode(0) - , pendingDownloadDataEmissions(new QAtomicInt()) - , pendingDownloadProgressEmissions(new QAtomicInt()) + + , outgoingData(0) + + , bytesUploaded(-1) + + + , cacheLoadDevice(0) , loadingFromCache(false) -#ifndef QT_NO_OPENSSL - , pendingIgnoreAllSslErrors(false) -#endif + + , cacheSaveDevice(0) + , cacheEnabled(false) + + , resumeOffset(0) - , outgoingData(0), - cacheLoadDevice(0), - cacheEnabled(false), cacheSaveDevice(0), - // notificationHandlingPaused(false), - bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1), - //httpStatusCode(0), - state(Idle) - , downloadBufferReadPosition(0) - , downloadBufferCurrentSize(0) - , downloadBufferMaximumSize(0) - , downloadZerocopyBuffer(0) - , synchronous(false) + , preMigrationDownloaded(-1) + + , bytesDownloaded(0) + , lastBytesDownloaded(-1) + , downloadBufferReadPosition(0) + , downloadBufferCurrentSize(0) + , downloadBufferMaximumSize(0) + , downloadZerocopyBuffer(0) + , pendingDownloadDataEmissions(new QAtomicInt()) + , pendingDownloadProgressEmissions(new QAtomicInt()) + #ifndef QT_NO_OPENSSL + , pendingIgnoreAllSslErrors(false) + #endif { } diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h index 2040d4209b..63ad2b9750 100644 --- a/src/network/access/qnetworkreplyhttpimpl_p.h +++ b/src/network/access/qnetworkreplyhttpimpl_p.h @@ -194,25 +194,30 @@ public: void redirectionRequested(const QUrl &target); + // incoming from user QNetworkAccessManager *manager; QNetworkAccessManagerPrivate *managerPrivate; QNetworkRequest request; - QNetworkAccessManager::Operation operation; + QNetworkAccessManager::Operation operation; // FIXME already in replyprivate? + QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread + bool synchronous; + State state; + + // from http thread + int statusCode; + QString reasonPhrase; + + // upload QNonContiguousByteDevice* createUploadByteDevice(); QSharedPointer<QNonContiguousByteDevice> uploadByteDevice; QIODevice *outgoingData; QSharedPointer<QRingBuffer> outgoingDataBuffer; void emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal); // dup? - - - bool migrateBackend(); - quint64 resumeOffset; - bool canResume() const; - void setResumeOffset(quint64 offset); qint64 bytesUploaded; - qint64 preMigrationDownloaded; + + // cache void createCache(); void completeCacheSave(); void setCachingEnabled(bool enable); @@ -220,10 +225,11 @@ public: void initCacheSaveDevice(); QAbstractNetworkCache *networkCache() const; QIODevice *cacheLoadDevice; - bool cacheEnabled; // is this for saving? - QIODevice *cacheSaveDevice; bool loadingFromCache; + QIODevice *cacheSaveDevice; + bool cacheEnabled; // is this for saving? + QUrl urlForLastAuthentication; #ifndef QT_NO_NETWORKPROXY @@ -231,11 +237,12 @@ public: QList<QNetworkProxy> proxyList; #endif - int statusCode; - QString reasonPhrase; - - State state; + bool migrateBackend(); + bool canResume() const; + void setResumeOffset(quint64 offset); + quint64 resumeOffset; + qint64 preMigrationDownloaded; // Used for normal downloading. For "zero copy" the downloadZerocopyBuffer is used QByteDataBuffer downloadMultiBuffer; @@ -251,14 +258,10 @@ public: QSharedPointer<char> downloadBufferPointer; char* downloadZerocopyBuffer; - - QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread - // Will be increased by HTTP thread: QSharedPointer<QAtomicInt> pendingDownloadDataEmissions; QSharedPointer<QAtomicInt> pendingDownloadProgressEmissions; - bool synchronous; #ifndef QT_NO_OPENSSL QSslConfiguration sslConfiguration; |