diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2014-01-13 11:20:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 11:21:36 +0100 |
commit | 2160f1215533130d0bfa16ad7b7bf20c88ac8028 (patch) | |
tree | 60e73feb04de1e2f32f69130967792720b88c103 /src/imports/qmlwebsockets | |
parent | 98b3f19b107b3b30323caabc94ace06f4a51d38a (diff) | |
download | qtwebsockets-2160f1215533130d0bfa16ad7b7bf20c88ac8028.tar.gz |
Use new connect syntax
Change-Id: Idd002ff72d27e5b549600704ae0e857bd021f5d1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/imports/qmlwebsockets')
-rw-r--r-- | src/imports/qmlwebsockets/qqmlwebsocket.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/imports/qmlwebsockets/qqmlwebsocket.cpp b/src/imports/qmlwebsockets/qqmlwebsocket.cpp index f48b4b3..d2f1016 100644 --- a/src/imports/qmlwebsockets/qqmlwebsocket.cpp +++ b/src/imports/qmlwebsockets/qqmlwebsocket.cpp @@ -168,9 +168,13 @@ void QQmlWebSocket::componentComplete() { m_webSocket.reset(new (std::nothrow) QWebSocket()); if (Q_LIKELY(m_webSocket)) { - connect(m_webSocket.data(), SIGNAL(textMessageReceived(QString)), this, SIGNAL(textMessageReceived(QString))); - connect(m_webSocket.data(), SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onError(QAbstractSocket::SocketError))); - connect(m_webSocket.data(), SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(onStateChanged(QAbstractSocket::SocketState))); + connect(m_webSocket.data(), &QWebSocket::textMessageReceived, + this, &QQmlWebSocket::textMessageReceived); + typedef void (QWebSocket::* ErrorSignal)(QAbstractSocket::SocketError); + connect(m_webSocket.data(), static_cast<ErrorSignal>(&QWebSocket::error), + this, &QQmlWebSocket::onError); + connect(m_webSocket.data(), &QWebSocket::stateChanged, + this, &QQmlWebSocket::onStateChanged); m_componentCompleted = true; |