QtNetwork: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I9a05d375d2d9d3ed56079ad024c89a08a290619b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
7c8b0c098a
commit
08f6b38ec7
|
|
@ -124,7 +124,7 @@ public Q_SLOTS:
|
|||
virtual void clear() = 0;
|
||||
|
||||
protected:
|
||||
explicit QAbstractNetworkCache(QObject *parent = 0);
|
||||
explicit QAbstractNetworkCache(QObject *parent = Q_NULLPTR);
|
||||
QAbstractNetworkCache(QAbstractNetworkCachePrivate &dd, QObject *parent);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ public:
|
|||
AlternativeType
|
||||
};
|
||||
|
||||
explicit QHttpMultiPart(QObject *parent = 0);
|
||||
explicit QHttpMultiPart(ContentType contentType, QObject *parent = 0);
|
||||
explicit QHttpMultiPart(QObject *parent = Q_NULLPTR);
|
||||
explicit QHttpMultiPart(ContentType contentType, QObject *parent = Q_NULLPTR);
|
||||
~QHttpMultiPart();
|
||||
|
||||
void append(const QHttpPart &httpPart);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public:
|
|||
};
|
||||
#endif
|
||||
|
||||
explicit QNetworkAccessManager(QObject *parent = 0);
|
||||
explicit QNetworkAccessManager(QObject *parent = Q_NULLPTR);
|
||||
~QNetworkAccessManager();
|
||||
|
||||
// ### Qt 6: turn into virtual
|
||||
|
|
@ -120,7 +120,7 @@ public:
|
|||
QNetworkReply *put(const QNetworkRequest &request, const QByteArray &data);
|
||||
QNetworkReply *put(const QNetworkRequest &request, QHttpMultiPart *multiPart);
|
||||
QNetworkReply *deleteResource(const QNetworkRequest &request);
|
||||
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0);
|
||||
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = Q_NULLPTR);
|
||||
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
void setConfiguration(const QNetworkConfiguration &config);
|
||||
|
|
@ -157,7 +157,7 @@ Q_SIGNALS:
|
|||
|
||||
protected:
|
||||
virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request,
|
||||
QIODevice *outgoingData = 0);
|
||||
QIODevice *outgoingData = Q_NULLPTR);
|
||||
|
||||
protected Q_SLOTS:
|
||||
QStringList supportedSchemesImplementation() const;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Q_NETWORK_EXPORT QNetworkCookieJar: public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QNetworkCookieJar(QObject *parent = 0);
|
||||
explicit QNetworkCookieJar(QObject *parent = Q_NULLPTR);
|
||||
virtual ~QNetworkCookieJar();
|
||||
|
||||
virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Q_NETWORK_EXPORT QNetworkDiskCache : public QAbstractNetworkCache
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QNetworkDiskCache(QObject *parent = 0);
|
||||
explicit QNetworkDiskCache(QObject *parent = Q_NULLPTR);
|
||||
~QNetworkDiskCache();
|
||||
|
||||
QString cacheDirectory() const;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ Q_SIGNALS:
|
|||
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||
|
||||
protected:
|
||||
explicit QNetworkReply(QObject *parent = 0);
|
||||
explicit QNetworkReply(QObject *parent = Q_NULLPTR);
|
||||
QNetworkReply(QNetworkReplyPrivate &dd, QObject *parent);
|
||||
virtual qint64 writeData(const char *data, qint64 len) Q_DECL_OVERRIDE;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
Q_DECLARE_FLAGS(Capabilities, Capability)
|
||||
|
||||
explicit QNetworkConfigurationManager(QObject *parent = 0);
|
||||
explicit QNetworkConfigurationManager(QObject *parent = Q_NULLPTR);
|
||||
virtual ~QNetworkConfigurationManager();
|
||||
|
||||
QNetworkConfigurationManager::Capabilities capabilities() const;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
Q_DECLARE_FLAGS(UsagePolicies, UsagePolicy)
|
||||
|
||||
explicit QNetworkSession(const QNetworkConfiguration &connConfig, QObject *parent = 0);
|
||||
explicit QNetworkSession(const QNetworkConfiguration &connConfig, QObject *parent = Q_NULLPTR);
|
||||
virtual ~QNetworkSession();
|
||||
|
||||
bool isOpen() const;
|
||||
|
|
|
|||
|
|
@ -211,9 +211,9 @@ public:
|
|||
};
|
||||
Q_ENUM(Type)
|
||||
|
||||
explicit QDnsLookup(QObject *parent = 0);
|
||||
QDnsLookup(Type type, const QString &name, QObject *parent = 0);
|
||||
QDnsLookup(Type type, const QString &name, const QHostAddress &nameserver, QObject *parent = 0);
|
||||
explicit QDnsLookup(QObject *parent = Q_NULLPTR);
|
||||
QDnsLookup(Type type, const QString &name, QObject *parent = Q_NULLPTR);
|
||||
QDnsLookup(Type type, const QString &name, const QHostAddress &nameserver, QObject *parent = Q_NULLPTR);
|
||||
~QDnsLookup();
|
||||
|
||||
Error error() const;
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ protected:
|
|||
void setPeerAddress(const QHostAddress &address);
|
||||
void setPeerName(const QString &name);
|
||||
|
||||
QAbstractSocket(SocketType socketType, QAbstractSocketPrivate &dd, QObject *parent = 0);
|
||||
QAbstractSocket(SocketType socketType, QAbstractSocketPrivate &dd, QObject *parent = Q_NULLPTR);
|
||||
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(QAbstractSocket)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
};
|
||||
Q_DECLARE_FLAGS(SocketOptions, SocketOption)
|
||||
|
||||
explicit QLocalServer(QObject *parent = 0);
|
||||
explicit QLocalServer(QObject *parent = Q_NULLPTR);
|
||||
~QLocalServer();
|
||||
|
||||
void close();
|
||||
|
|
@ -80,7 +80,7 @@ public:
|
|||
static bool removeServer(const QString &name);
|
||||
QAbstractSocket::SocketError serverError() const;
|
||||
void setMaxPendingConnections(int numConnections);
|
||||
bool waitForNewConnection(int msec = 0, bool *timedOut = 0);
|
||||
bool waitForNewConnection(int msec = 0, bool *timedOut = Q_NULLPTR);
|
||||
|
||||
void setSocketOptions(SocketOptions options);
|
||||
SocketOptions socketOptions() const;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
ClosingState = QAbstractSocket::ClosingState
|
||||
};
|
||||
|
||||
QLocalSocket(QObject *parent = 0);
|
||||
QLocalSocket(QObject *parent = Q_NULLPTR);
|
||||
~QLocalSocket();
|
||||
|
||||
void connectToServer(OpenMode openMode = ReadWrite);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Q_NETWORK_EXPORT QTcpServer : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QTcpServer(QObject *parent = 0);
|
||||
explicit QTcpServer(QObject *parent = Q_NULLPTR);
|
||||
virtual ~QTcpServer();
|
||||
|
||||
bool listen(const QHostAddress &address = QHostAddress::Any, quint16 port = 0);
|
||||
|
|
@ -68,7 +68,7 @@ public:
|
|||
qintptr socketDescriptor() const;
|
||||
bool setSocketDescriptor(qintptr socketDescriptor);
|
||||
|
||||
bool waitForNewConnection(int msec = 0, bool *timedOut = 0);
|
||||
bool waitForNewConnection(int msec = 0, bool *timedOut = Q_NULLPTR);
|
||||
virtual bool hasPendingConnections() const;
|
||||
virtual QTcpSocket *nextPendingConnection();
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ protected:
|
|||
virtual void incomingConnection(qintptr handle);
|
||||
void addPendingConnection(QTcpSocket* socket);
|
||||
|
||||
QTcpServer(QTcpServerPrivate &dd, QObject *parent = 0);
|
||||
QTcpServer(QTcpServerPrivate &dd, QObject *parent = Q_NULLPTR);
|
||||
|
||||
Q_SIGNALS:
|
||||
void newConnection();
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QTcpSocket(QObject *parent = 0);
|
||||
explicit QTcpSocket(QObject *parent = Q_NULLPTR);
|
||||
virtual ~QTcpSocket();
|
||||
|
||||
protected:
|
||||
QTcpSocket(QTcpSocketPrivate &dd, QObject *parent = 0);
|
||||
QTcpSocket(QTcpSocketPrivate &dd, QObject *parent = Q_NULLPTR);
|
||||
QTcpSocket(QAbstractSocket::SocketType socketType, QTcpSocketPrivate &dd,
|
||||
QObject *parent = 0);
|
||||
QObject *parent = Q_NULLPTR);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QTcpSocket)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Q_NETWORK_EXPORT QUdpSocket : public QAbstractSocket
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QUdpSocket(QObject *parent = 0);
|
||||
explicit QUdpSocket(QObject *parent = Q_NULLPTR);
|
||||
virtual ~QUdpSocket();
|
||||
|
||||
#ifndef QT_NO_NETWORKINTERFACE
|
||||
|
|
@ -66,7 +66,7 @@ public:
|
|||
|
||||
bool hasPendingDatagrams() const;
|
||||
qint64 pendingDatagramSize() const;
|
||||
qint64 readDatagram(char *data, qint64 maxlen, QHostAddress *host = 0, quint16 *port = 0);
|
||||
qint64 readDatagram(char *data, qint64 maxlen, QHostAddress *host = Q_NULLPTR, quint16 *port = Q_NULLPTR);
|
||||
qint64 writeDatagram(const char *data, qint64 len, const QHostAddress &host, quint16 port);
|
||||
inline qint64 writeDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port)
|
||||
{ return writeDatagram(datagram.constData(), datagram.size(), host, port); }
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ public:
|
|||
|
||||
static bool importPkcs12(QIODevice *device,
|
||||
QSslKey *key, QSslCertificate *cert,
|
||||
QList<QSslCertificate> *caCertificates=0,
|
||||
QList<QSslCertificate> *caCertificates = Q_NULLPTR,
|
||||
const QByteArray &passPhrase=QByteArray());
|
||||
|
||||
Qt::HANDLE handle() const;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
AutoVerifyPeer
|
||||
};
|
||||
|
||||
explicit QSslSocket(QObject *parent = 0);
|
||||
explicit QSslSocket(QObject *parent = Q_NULLPTR);
|
||||
~QSslSocket();
|
||||
void resume() Q_DECL_OVERRIDE; // to continue after proxy authentication required, SSL errors etc.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue