diff options
Diffstat (limited to 'src/libsync/bandwidthmanager.cpp')
-rw-r--r-- | src/libsync/bandwidthmanager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsync/bandwidthmanager.cpp b/src/libsync/bandwidthmanager.cpp index c1ed6adcd..6c9796343 100644 --- a/src/libsync/bandwidthmanager.cpp +++ b/src/libsync/bandwidthmanager.cpp @@ -120,7 +120,7 @@ void BandwidthManager::unregisterUploadDevice(QObject *o) } } -void BandwidthManager::registerDownloadJob(GETFileJob *j) +void BandwidthManager::registerDownloadJob(GETJob *j) { _downloadJobList.append(j); QObject::connect(j, &QObject::destroyed, this, &BandwidthManager::unregisterDownloadJob); @@ -139,7 +139,7 @@ void BandwidthManager::registerDownloadJob(GETFileJob *j) void BandwidthManager::unregisterDownloadJob(QObject *o) { - GETFileJob *j = reinterpret_cast<GETFileJob *>(o); // note, we might already be in the ~QObject + GETJob *j = reinterpret_cast<GETJob *>(o); // note, we might already be in the ~QObject _downloadJobList.removeAll(j); if (_relativeLimitCurrentMeasuredJob == j) { _relativeLimitCurrentMeasuredJob = 0; @@ -289,7 +289,7 @@ void BandwidthManager::relativeDownloadMeasuringTimerExpired() quota -= 20 * 1024; } qint64 quotaPerJob = quota / jobCount + 1.0; - Q_FOREACH (GETFileJob *gfj, _downloadJobList) { + Q_FOREACH (GETJob *gfj, _downloadJobList) { gfj->setBandwidthLimited(true); gfj->setChoked(false); gfj->giveBandwidthQuota(quotaPerJob); @@ -323,7 +323,7 @@ void BandwidthManager::relativeDownloadDelayTimerExpired() _relativeLimitCurrentMeasuredJob->setChoked(false); // choke all other download jobs - Q_FOREACH (GETFileJob *gfj, _downloadJobList) { + Q_FOREACH (GETJob *gfj, _downloadJobList) { if (gfj != _relativeLimitCurrentMeasuredJob) { gfj->setBandwidthLimited(true); gfj->setChoked(true); @@ -358,7 +358,7 @@ void BandwidthManager::switchingTimerExpired() if (newDownloadLimit != _currentDownloadLimit) { qCInfo(lcBandwidthManager) << "Download Bandwidth limit changed" << _currentDownloadLimit << newDownloadLimit; _currentDownloadLimit = newDownloadLimit; - Q_FOREACH (GETFileJob *j, _downloadJobList) { + Q_FOREACH (GETJob *j, _downloadJobList) { if (usingAbsoluteDownloadLimit()) { j->setBandwidthLimited(true); j->setChoked(false); @@ -386,7 +386,7 @@ void BandwidthManager::absoluteLimitTimerExpired() if (usingAbsoluteDownloadLimit() && _downloadJobList.count() > 0) { qint64 quotaPerJob = _currentDownloadLimit / qMax(1, _downloadJobList.count()); qCDebug(lcBandwidthManager) << quotaPerJob << _downloadJobList.count() << _currentDownloadLimit; - Q_FOREACH (GETFileJob *j, _downloadJobList) { + Q_FOREACH (GETJob *j, _downloadJobList) { j->giveBandwidthQuota(quotaPerJob); qCDebug(lcBandwidthManager) << "Gave " << quotaPerJob / 1024.0 << " kB to" << j; } |