examples: port network examples to new connection style

Task-number: QTBUG-106893
Change-Id: Id0f558362108fedececb9eede36becc04ff4e307
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Samuel Gaist 2022-11-23 23:00:39 +01:00
parent cf6522e5d7
commit e686a13b7b
6 changed files with 6 additions and 6 deletions

View File

@ -200,7 +200,7 @@ int main(int argc, char *argv[])
DnsManager manager;
manager.setQuery(query);
QTimer::singleShot(0, &manager, SLOT(execute()));
QTimer::singleShot(0, &manager, &DnsManager::execute);
return app.exec();
}

View File

@ -158,7 +158,7 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv);
DownloadManager manager;
QTimer::singleShot(0, &manager, SLOT(execute()));
QTimer::singleShot(0, &manager, &DownloadManager::execute);
app.exec();
}

View File

@ -27,7 +27,7 @@ ChatDialog::ChatDialog(QWidget *parent)
myNickName = client.nickName();
newParticipant(myNickName);
tableFormat.setBorder(0);
QTimer::singleShot(10 * 1000, this, SLOT(showInformation()));
QTimer::singleShot(10 * 1000, this, &ChatDialog::showInformation);
}
void ChatDialog::appendMessage(const QString &from, const QString &message)

View File

@ -83,7 +83,7 @@ void MainWindow::on_connectButton_clicked()
return startNewConnection(remoteAddress);
addInfoMessage(tr("Looking up the host ..."));
lookupId = QHostInfo::lookupHost(hostName, this, SLOT(lookupFinished(QHostInfo)));
lookupId = QHostInfo::lookupHost(hostName, this, &MainWindow::lookupFinished);
updateUi();
}

View File

@ -42,7 +42,7 @@ void RateController::scheduleTransfer()
if (transferScheduled)
return;
transferScheduled = true;
QTimer::singleShot(50, this, SLOT(transfer()));
QTimer::singleShot(50, this, &RateController::transfer);
}
void RateController::transfer()

View File

@ -20,7 +20,7 @@ TrackerClient::TrackerClient(TorrentClient *downloader, QObject *parent)
void TrackerClient::start(const MetaInfo &info)
{
metaInfo = info;
QTimer::singleShot(0, this, SLOT(fetchPeerList()));
QTimer::singleShot(0, this, &TrackerClient::fetchPeerList);
if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
length = metaInfo.singleFile().length;