From 5002f3ebec8a8c35b87bf731e9149c7dcd4f4500 Mon Sep 17 00:00:00 2001 From: Ludovic LANGE Date: Tue, 27 Sep 2022 22:15:47 +0200 Subject: [PATCH] fix some static cast errors in QMqtt The following error occurs twice: ``` mqtt/qmqtt_ssl_socket.cpp:49:13: error: static_cast from 'QAbstractSocket::SocketError (QAbstractSocket::*)() const' to 'void (QSslSocket::*)(QAbstractSocket::SocketError)' is not allowed ``` It may not be the cleanest fix but the it is the only one I could come with... --- mqtt/qmqtt_socket.cpp | 4 ++-- mqtt/qmqtt_ssl_socket.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mqtt/qmqtt_socket.cpp b/mqtt/qmqtt_socket.cpp index f0628f0..5805f94 100644 --- a/mqtt/qmqtt_socket.cpp +++ b/mqtt/qmqtt_socket.cpp @@ -41,9 +41,9 @@ QMQTT::Socket::Socket(QObject* parent) connect(_socket.data(), &QTcpSocket::connected, this, &SocketInterface::connected); connect(_socket.data(), &QTcpSocket::disconnected, this, &SocketInterface::disconnected); connect(_socket.data(), - static_cast(&QTcpSocket::error), + SIGNAL(error(QTcpSocket::error)), this, - static_cast(&SocketInterface::error)); + SLOT(errorHandler(SocketInterface::error))); } QMQTT::Socket::~Socket() diff --git a/mqtt/qmqtt_ssl_socket.cpp b/mqtt/qmqtt_ssl_socket.cpp index 2d3a808..9f70434 100644 --- a/mqtt/qmqtt_ssl_socket.cpp +++ b/mqtt/qmqtt_ssl_socket.cpp @@ -46,9 +46,9 @@ QMQTT::SslSocket::SslSocket(const QSslConfiguration& config, QObject* parent) connect(_socket.data(), &QSslSocket::encrypted, this, &SocketInterface::connected); connect(_socket.data(), &QSslSocket::disconnected, this, &SocketInterface::disconnected); connect(_socket.data(), - static_cast(&QSslSocket::error), + SIGNAL(error(QSslSocket::error)), this, - static_cast(&SocketInterface::error)); + SLOT(errorHandler(SocketInterface::error))); connect(_socket.data(), static_cast&)>(&QSslSocket::sslErrors), this,