diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-07-17 01:00:21 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-17 10:19:22 +0200 |
commit | 1783fca89768a9d503d886673643dc4542ec467f (patch) | |
tree | 5055f39393017219e448ade71b3842896c4679c5 /src/network | |
parent | b82648bd59256abb8e7084e0424a1f8a6a034c34 (diff) | |
parent | 435d1d53bd61491010dbb2130a27e35cd9798965 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/xcb/qxcbintegration.cpp
Conflicts git missed:
src/plugins/platforms/qnx/qqnxglcontext.cpp
Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 4 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessmanager_p.h | 11 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 32 |
3 files changed, 24 insertions, 23 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 76850837d0..96e3f92db1 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -548,7 +548,7 @@ void QNetworkAccessManager::setProxy(const QNetworkProxy &proxy) Q_D(QNetworkAccessManager); delete d->proxyFactory; d->proxy = proxy; - d->proxyFactory = 0; + d->proxyFactory = nullptr; } /*! @@ -1804,7 +1804,7 @@ void QNetworkAccessManagerPrivate::destroyThread() delete thread; else QObject::connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); - thread = 0; + thread = nullptr; } } diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index 428110e8bc..ffed24a314 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -77,10 +77,11 @@ class QNetworkAccessManagerPrivate: public QObjectPrivate { public: QNetworkAccessManagerPrivate() - : networkCache(0), cookieJar(0), - thread(0), + : networkCache(nullptr), + cookieJar(nullptr), + thread(nullptr), #ifndef QT_NO_NETWORKPROXY - proxyFactory(0), + proxyFactory(nullptr), #endif #ifndef QT_NO_BEARERMANAGEMENT lastSessionState(QNetworkSession::Invalid), @@ -130,7 +131,7 @@ public: bool allowAuthenticationReuse = true); void cacheCredentials(const QUrl &url, const QAuthenticator *auth); QNetworkAuthenticationCredential *fetchCachedCredentials(const QUrl &url, - const QAuthenticator *auth = 0); + const QAuthenticator *auth = nullptr); #ifndef QT_NO_NETWORKPROXY void proxyAuthenticationRequired(const QUrl &url, @@ -140,7 +141,7 @@ public: QNetworkProxy *lastProxyAuthentication); void cacheProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth); QNetworkAuthenticationCredential *fetchCachedProxyCredentials(const QNetworkProxy &proxy, - const QAuthenticator *auth = 0); + const QAuthenticator *auth = nullptr); QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query); #endif diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 3c6f4aadfa..8750a841f6 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -69,7 +69,7 @@ class QNetworkProxy; static inline bool isSeparator(char c) { static const char separators[] = "()<>@,;:\\\"/[]?={}"; - return isLWS(c) || strchr(separators, c) != 0; + return isLWS(c) || strchr(separators, c) != nullptr; } // ### merge with nextField in cookiejar.cpp @@ -438,18 +438,18 @@ void QNetworkReplyHttpImpl::sslConfigurationImplementation(QSslConfiguration &co QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate() : QNetworkReplyPrivate() - , manager(0) - , managerPrivate(0) + , manager(nullptr) + , managerPrivate(nullptr) , synchronous(false) , state(Idle) , statusCode(0) , uploadByteDevicePosition(false) , uploadDeviceChoking(false) - , outgoingData(0) + , outgoingData(nullptr) , bytesUploaded(-1) - , cacheLoadDevice(0) + , cacheLoadDevice(nullptr) , loadingFromCache(false) - , cacheSaveDevice(0) + , cacheSaveDevice(nullptr) , cacheEnabled(false) , resumeOffset(0) , preMigrationDownloaded(-1) @@ -457,7 +457,7 @@ QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate() , bytesBuffered(0) , downloadBufferReadPosition(0) , downloadBufferCurrentSize(0) - , downloadZerocopyBuffer(0) + , downloadZerocopyBuffer(nullptr) , pendingDownloadDataEmissions(QSharedPointer<QAtomicInt>::create()) , pendingDownloadProgressEmissions(QSharedPointer<QAtomicInt>::create()) #ifndef QT_NO_SSL @@ -618,7 +618,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq { Q_Q(QNetworkReplyHttpImpl); - QThread *thread = 0; + QThread *thread = nullptr; if (synchronous) { // A synchronous HTTP request uses its own thread thread = new QThread(); @@ -1031,7 +1031,7 @@ void QNetworkReplyHttpImplPrivate::initCacheSaveDevice() managerPrivate->networkCache->metaObject()->className()); managerPrivate->networkCache->remove(url); - cacheSaveDevice = 0; + cacheSaveDevice = nullptr; cacheEnabled = false; } } @@ -1973,7 +1973,7 @@ void QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead() qint64 actualCount = cacheLoadDevice->read(&c, 1); if (actualCount < 0) { cacheLoadDevice->deleteLater(); - cacheLoadDevice = 0; + cacheLoadDevice = nullptr; QMetaObject::invokeMethod(q, "_q_finished", Qt::QueuedConnection); } else if (actualCount == 1) { // This is most probably not happening since most QIODevice returned something proper for bytesAvailable() @@ -1983,7 +1983,7 @@ void QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead() } else if ((!cacheLoadDevice->isSequential() && cacheLoadDevice->atEnd())) { // This codepath is in case the cache device is a QBuffer, e.g. from QNetworkDiskCache. cacheLoadDevice->deleteLater(); - cacheLoadDevice = 0; + cacheLoadDevice = nullptr; QMetaObject::invokeMethod(q, "_q_finished", Qt::QueuedConnection); } } @@ -2010,7 +2010,7 @@ void QNetworkReplyHttpImplPrivate::_q_cacheSaveDeviceAboutToClose() { // do not keep a dangling pointer to the device around (device // is closing because e.g. QAbstractNetworkCache::remove() was called). - cacheSaveDevice = 0; + cacheSaveDevice = nullptr; } void QNetworkReplyHttpImplPrivate::_q_bufferOutgoingData() @@ -2162,7 +2162,7 @@ QNonContiguousByteDevice* QNetworkReplyHttpImplPrivate::createUploadByteDevice() else if (outgoingData) { uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(outgoingData); } else { - return 0; + return nullptr; } // We want signal emissions only for normal asynchronous uploads @@ -2335,7 +2335,7 @@ void QNetworkReplyHttpImplPrivate::createCache() bool QNetworkReplyHttpImplPrivate::isCachingEnabled() const { - return (cacheEnabled && managerPrivate->networkCache != 0); + return (cacheEnabled && managerPrivate->networkCache != nullptr); } void QNetworkReplyHttpImplPrivate::setCachingEnabled(bool enable) @@ -2359,7 +2359,7 @@ void QNetworkReplyHttpImplPrivate::setCachingEnabled(bool enable) // ok... but you should make up your mind qDebug("QNetworkReplyImpl: setCachingEnabled(true) called after setCachingEnabled(false)"); managerPrivate->networkCache->remove(url); - cacheSaveDevice = 0; + cacheSaveDevice = nullptr; cacheEnabled = false; } } @@ -2376,7 +2376,7 @@ void QNetworkReplyHttpImplPrivate::completeCacheSave() } else if (cacheEnabled && cacheSaveDevice) { managerPrivate->networkCache->insert(cacheSaveDevice); } - cacheSaveDevice = 0; + cacheSaveDevice = nullptr; cacheEnabled = false; } |