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:
parent
cf6522e5d7
commit
e686a13b7b
@ -200,7 +200,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
DnsManager manager;
|
DnsManager manager;
|
||||||
manager.setQuery(query);
|
manager.setQuery(query);
|
||||||
QTimer::singleShot(0, &manager, SLOT(execute()));
|
QTimer::singleShot(0, &manager, &DnsManager::execute);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
|
|
||||||
DownloadManager manager;
|
DownloadManager manager;
|
||||||
QTimer::singleShot(0, &manager, SLOT(execute()));
|
QTimer::singleShot(0, &manager, &DownloadManager::execute);
|
||||||
|
|
||||||
app.exec();
|
app.exec();
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ ChatDialog::ChatDialog(QWidget *parent)
|
|||||||
myNickName = client.nickName();
|
myNickName = client.nickName();
|
||||||
newParticipant(myNickName);
|
newParticipant(myNickName);
|
||||||
tableFormat.setBorder(0);
|
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)
|
void ChatDialog::appendMessage(const QString &from, const QString &message)
|
||||||
|
@ -83,7 +83,7 @@ void MainWindow::on_connectButton_clicked()
|
|||||||
return startNewConnection(remoteAddress);
|
return startNewConnection(remoteAddress);
|
||||||
|
|
||||||
addInfoMessage(tr("Looking up the host ..."));
|
addInfoMessage(tr("Looking up the host ..."));
|
||||||
lookupId = QHostInfo::lookupHost(hostName, this, SLOT(lookupFinished(QHostInfo)));
|
lookupId = QHostInfo::lookupHost(hostName, this, &MainWindow::lookupFinished);
|
||||||
updateUi();
|
updateUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ void RateController::scheduleTransfer()
|
|||||||
if (transferScheduled)
|
if (transferScheduled)
|
||||||
return;
|
return;
|
||||||
transferScheduled = true;
|
transferScheduled = true;
|
||||||
QTimer::singleShot(50, this, SLOT(transfer()));
|
QTimer::singleShot(50, this, &RateController::transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RateController::transfer()
|
void RateController::transfer()
|
||||||
|
@ -20,7 +20,7 @@ TrackerClient::TrackerClient(TorrentClient *downloader, QObject *parent)
|
|||||||
void TrackerClient::start(const MetaInfo &info)
|
void TrackerClient::start(const MetaInfo &info)
|
||||||
{
|
{
|
||||||
metaInfo = info;
|
metaInfo = info;
|
||||||
QTimer::singleShot(0, this, SLOT(fetchPeerList()));
|
QTimer::singleShot(0, this, &TrackerClient::fetchPeerList);
|
||||||
|
|
||||||
if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
|
if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
|
||||||
length = metaInfo.singleFile().length;
|
length = metaInfo.singleFile().length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user