Convert to signal/slot disconnect based on member function pointer

parent e3be875f
......@@ -299,7 +299,8 @@ namespace Konversation
return;
}
disconnect(this->sender(), SIGNAL(forwardComplete(bool,quint16)), this, SLOT(sendRequest(bool,quint16)));
auto* router = qobject_cast<UPnPRouter*>(this->sender());
disconnect(router, &UPnPRouter::forwardComplete, this, &Chat::sendRequest);
if (error)
{
......@@ -330,7 +331,8 @@ namespace Konversation
return;
}
disconnect(this->sender(), SIGNAL(forwardComplete(bool,quint16)), this, SLOT(sendReverseAck(bool,quint16)));
auto* router = qobject_cast<UPnPRouter*>(this->sender());
disconnect(router, &UPnPRouter::forwardComplete, this, &Chat::sendReverseAck);
if (error)
{
......
......@@ -589,7 +589,8 @@ namespace Konversation
{
if (port != m_ownPort) return; // Somebody elses forward succeeded
disconnect (this->sender(), SIGNAL(forwardComplete(bool,quint16)), this, SLOT(sendReverseAck(bool,quint16)));
auto* router = qobject_cast<UPnP::UPnPRouter*>(this->sender());
disconnect(router, &UPnP::UPnPRouter::forwardComplete, this, &TransferRecv::sendReverseAck);
if (error)
{
......
......@@ -396,7 +396,8 @@ namespace Konversation
{
if (port != m_ownPort) return; // Somebody elses forward succeeded
disconnect(this->sender(), SIGNAL(forwardComplete(bool,quint16)), this, SLOT(sendRequest(bool,quint16)));
auto* router = qobject_cast<UPnP::UPnPRouter*>(this->sender());
disconnect(router, &UPnPRouter::forwardComplete, this, &TransferSend::sendRequest);
if (error)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment