diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2022-11-23 23:00:39 +0100 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2022-12-21 21:52:17 +0100 |
commit | e686a13b7b2e37924e8d2a08187a538cf56a0ff3 (patch) | |
tree | b9fbbab1d9063e6e7f0c871f4daa2a1353068d6f | |
parent | cf6522e5d7fad2be4759f2c3a5bb4a04929db81c (diff) |
examples: port network examples to new connection style
Task-number: QTBUG-106893
Change-Id: Id0f558362108fedececb9eede36becc04ff4e307
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | examples/network/dnslookup/dnslookup.cpp | 2 | ||||
-rw-r--r-- | examples/network/download/main.cpp | 2 | ||||
-rw-r--r-- | examples/network/network-chat/chatdialog.cpp | 2 | ||||
-rw-r--r-- | examples/network/secureudpclient/mainwindow.cpp | 2 | ||||
-rw-r--r-- | examples/network/torrent/ratecontroller.cpp | 2 | ||||
-rw-r--r-- | examples/network/torrent/trackerclient.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/examples/network/dnslookup/dnslookup.cpp b/examples/network/dnslookup/dnslookup.cpp index 91311b26b8..c0f593563c 100644 --- a/examples/network/dnslookup/dnslookup.cpp +++ b/examples/network/dnslookup/dnslookup.cpp @@ -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(); } diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp index 227035af69..25543a439e 100644 --- a/examples/network/download/main.cpp +++ b/examples/network/download/main.cpp @@ -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(); } diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp index ddec5c2997..7cf2c9fd4e 100644 --- a/examples/network/network-chat/chatdialog.cpp +++ b/examples/network/network-chat/chatdialog.cpp @@ -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) diff --git a/examples/network/secureudpclient/mainwindow.cpp b/examples/network/secureudpclient/mainwindow.cpp index 8b9ac24c62..987eb739b9 100644 --- a/examples/network/secureudpclient/mainwindow.cpp +++ b/examples/network/secureudpclient/mainwindow.cpp @@ -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(); } diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp index c5e33ab63c..338bb596c9 100644 --- a/examples/network/torrent/ratecontroller.cpp +++ b/examples/network/torrent/ratecontroller.cpp @@ -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() diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp index b82442b8c0..fc1849c221 100644 --- a/examples/network/torrent/trackerclient.cpp +++ b/examples/network/torrent/trackerclient.cpp @@ -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; |