From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/network/access/qhttpthreaddelegate.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/network/access/qhttpthreaddelegate.cpp') diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 63a3c4f204..f3125a3a95 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -189,7 +189,7 @@ public: QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt, QHttpNetworkConnection::ConnectionType connectionType, QSharedPointer networkSession) - : QHttpNetworkConnection(hostName, port, encrypt, connectionType, /*parent=*/0, + : QHttpNetworkConnection(hostName, port, encrypt, connectionType, /*parent=*/nullptr, std::move(networkSession)) #endif { @@ -241,9 +241,9 @@ QHttpThreadDelegate::QHttpThreadDelegate(QObject *parent) : , removedContentLength(-1) , incomingErrorCode(QNetworkReply::NoError) , downloadBuffer() - , httpConnection(0) - , httpReply(0) - , synchronousRequestLoop(0) + , httpConnection(nullptr) + , httpReply(nullptr) + , synchronousRequestLoop(nullptr) { } @@ -439,7 +439,7 @@ void QHttpThreadDelegate::abortRequest() if (httpReply) { httpReply->abort(); delete httpReply; - httpReply = 0; + httpReply = nullptr; } // Got aborted by the timeout timer @@ -545,7 +545,7 @@ void QHttpThreadDelegate::finishedSlot() QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection); - httpReply = 0; + httpReply = nullptr; } void QHttpThreadDelegate::synchronousFinishedSlot() @@ -568,7 +568,7 @@ void QHttpThreadDelegate::synchronousFinishedSlot() QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection); QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection); - httpReply = 0; + httpReply = nullptr; } void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail) @@ -590,7 +590,7 @@ void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError erro QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection); - httpReply = 0; + httpReply = nullptr; } @@ -609,7 +609,7 @@ void QHttpThreadDelegate::synchronousFinishedWithErrorSlot(QNetworkReply::Networ QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection); QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection); - httpReply = 0; + httpReply = nullptr; } static void downloadBufferDeleter(char *ptr) -- cgit v1.2.3