refactor: Modernize Qt connections (#914)

This commit is contained in:
Murat Seker
2020-08-02 22:32:00 +02:00
committed by GitHub
parent d1a2b77ce3
commit 031b9a6b7c
22 changed files with 86 additions and 77 deletions

View File

@@ -63,7 +63,7 @@ void BonjourServiceBrowser::browseForServiceType(const QString &serviceType)
else
{
bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this);
connect(bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead()));
connect(bonjourSocket, &QSocketNotifier::activated, this, &BonjourServiceBrowser::bonjourSocketReadyRead);
}
}
}

View File

@@ -115,7 +115,7 @@ void BonjourServiceRegister::registerService(const BonjourRecord &record, quint1
else
{
bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this);
connect(bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead()));
connect(bonjourSocket, &QSocketNotifier::activated, this, &BonjourServiceRegister::bonjourSocketReadyRead);
}
}
}

View File

@@ -82,7 +82,7 @@ bool BonjourServiceResolver::resolveBonjourRecord(const BonjourRecord &record)
else
{
bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this);
connect(bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead()));
connect(bonjourSocket, &QSocketNotifier::activated, this, &BonjourServiceResolver::bonjourSocketReadyRead);
}
}
return true;