QNAM: Fix initialization order warnings

This commit is contained in:
Markus Goetz 2011-04-12 17:32:18 +02:00
parent b68f29720a
commit 6d3044db95
2 changed files with 54 additions and 35 deletions

View File

@ -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)
, outgoingData(0)
, bytesUploaded(-1)
, cacheLoadDevice(0)
, loadingFromCache(false)
, cacheSaveDevice(0)
, cacheEnabled(false)
, resumeOffset(0)
, preMigrationDownloaded(-1)
, bytesDownloaded(0)
, lastBytesDownloaded(-1)
, downloadBufferReadPosition(0)
, downloadBufferCurrentSize(0)
, downloadBufferMaximumSize(0)
, downloadZerocopyBuffer(0)
, pendingDownloadDataEmissions(new QAtomicInt())
, pendingDownloadProgressEmissions(new QAtomicInt())
, loadingFromCache(false)
#ifndef QT_NO_OPENSSL
, pendingIgnoreAllSslErrors(false)
#endif
, 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)
#ifndef QT_NO_OPENSSL
, pendingIgnoreAllSslErrors(false)
#endif
{
}

View File

@ -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;