summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent/ratecontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/torrent/ratecontroller.cpp')
-rw-r--r--examples/network/torrent/ratecontroller.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp
index 3dd256a0f6..338bb596c9 100644
--- a/examples/network/torrent/ratecontroller.cpp
+++ b/examples/network/torrent/ratecontroller.cpp
@@ -33,7 +33,7 @@ void RateController::removeSocket(PeerWireClient *socket)
void RateController::setDownloadLimit(int bytesPerSecond)
{
downLimit = bytesPerSecond;
- for (PeerWireClient *socket : qAsConst(sockets))
+ for (PeerWireClient *socket : std::as_const(sockets))
socket->setReadBufferSize(downLimit * 4);
}
@@ -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()
@@ -63,7 +63,7 @@ void RateController::transfer()
}
QSet<PeerWireClient *> pendingSockets;
- for (PeerWireClient *client : qAsConst(sockets)) {
+ for (PeerWireClient *client : std::as_const(sockets)) {
if (client->canTransferMore())
pendingSockets << client;
}