diff options
Diffstat (limited to 'examples/websockets')
6 files changed, 6 insertions, 7 deletions
diff --git a/examples/websockets/echoclient/echoclient.h b/examples/websockets/echoclient/echoclient.h index a0f0d37..a7fd234 100644 --- a/examples/websockets/echoclient/echoclient.h +++ b/examples/websockets/echoclient/echoclient.h @@ -57,7 +57,7 @@ class EchoClient : public QObject { Q_OBJECT public: - explicit EchoClient(const QUrl &url, bool debug = false, QObject *parent = Q_NULLPTR); + explicit EchoClient(const QUrl &url, bool debug = false, QObject *parent = nullptr); Q_SIGNALS: void closed(); diff --git a/examples/websockets/echoserver/echoserver.h b/examples/websockets/echoserver/echoserver.h index 593a8c8..3681917 100644 --- a/examples/websockets/echoserver/echoserver.h +++ b/examples/websockets/echoserver/echoserver.h @@ -61,7 +61,7 @@ class EchoServer : public QObject { Q_OBJECT public: - explicit EchoServer(quint16 port, bool debug = false, QObject *parent = Q_NULLPTR); + explicit EchoServer(quint16 port, bool debug = false, QObject *parent = nullptr); ~EchoServer(); Q_SIGNALS: diff --git a/examples/websockets/sslechoclient/sslechoclient.cpp b/examples/websockets/sslechoclient/sslechoclient.cpp index 3de2fec..6427f88 100644 --- a/examples/websockets/sslechoclient/sslechoclient.cpp +++ b/examples/websockets/sslechoclient/sslechoclient.cpp @@ -59,8 +59,7 @@ SslEchoClient::SslEchoClient(const QUrl &url, QObject *parent) : QObject(parent) { connect(&m_webSocket, &QWebSocket::connected, this, &SslEchoClient::onConnected); - typedef void (QWebSocket:: *sslErrorsSignal)(const QList<QSslError> &); - connect(&m_webSocket, static_cast<sslErrorsSignal>(&QWebSocket::sslErrors), + connect(&m_webSocket, QOverload<const QList<QSslError>&>::of(&QWebSocket::sslErrors), this, &SslEchoClient::onSslErrors); m_webSocket.open(QUrl(url)); } diff --git a/examples/websockets/sslechoclient/sslechoclient.h b/examples/websockets/sslechoclient/sslechoclient.h index 5b87557..6634a44 100644 --- a/examples/websockets/sslechoclient/sslechoclient.h +++ b/examples/websockets/sslechoclient/sslechoclient.h @@ -63,7 +63,7 @@ class SslEchoClient : public QObject { Q_OBJECT public: - explicit SslEchoClient(const QUrl &url, QObject *parent = Q_NULLPTR); + explicit SslEchoClient(const QUrl &url, QObject *parent = nullptr); private Q_SLOTS: void onConnected(); diff --git a/examples/websockets/sslechoserver/sslechoserver.cpp b/examples/websockets/sslechoserver/sslechoserver.cpp index ae5d9ad..00bc6c1 100644 --- a/examples/websockets/sslechoserver/sslechoserver.cpp +++ b/examples/websockets/sslechoserver/sslechoserver.cpp @@ -60,7 +60,7 @@ QT_USE_NAMESPACE //! [constructor] SslEchoServer::SslEchoServer(quint16 port, QObject *parent) : QObject(parent), - m_pWebSocketServer(Q_NULLPTR) + m_pWebSocketServer(nullptr) { m_pWebSocketServer = new QWebSocketServer(QStringLiteral("SSL Echo Server"), QWebSocketServer::SecureMode, diff --git a/examples/websockets/sslechoserver/sslechoserver.h b/examples/websockets/sslechoserver/sslechoserver.h index 109a78b..8064476 100644 --- a/examples/websockets/sslechoserver/sslechoserver.h +++ b/examples/websockets/sslechoserver/sslechoserver.h @@ -62,7 +62,7 @@ class SslEchoServer : public QObject { Q_OBJECT public: - explicit SslEchoServer(quint16 port, QObject *parent = Q_NULLPTR); + explicit SslEchoServer(quint16 port, QObject *parent = nullptr); virtual ~SslEchoServer(); private Q_SLOTS: |