-void QBittorrentSession::setDownloadrateLimit(int rate)
+void QBittorrentSession::setDownloadRateLimit(int rate)
{
btSession_.set_download_rate_limit(rate);
}
{
btSession_.set_download_rate_limit(rate);
}
void removeTorrent(qtrapids::QTorrentHandle const& handle);
void setUploadRateLimit(int rate);
void removeTorrent(qtrapids::QTorrentHandle const& handle);
void setUploadRateLimit(int rate);
- void setDownloadrateLimit(int rate);
+ void setDownloadRateLimit(int rate);
int getUploadRateLimt() const;
int getDownloadRateLimit() const;
int getUploadRateLimt() const;
int getDownloadRateLimit() const;
void MainWindow::RestoreSettings()
{
btSession_.setUploadRateLimit(settings_.value("network/uploadRate").toInt());
void MainWindow::RestoreSettings()
{
btSession_.setUploadRateLimit(settings_.value("network/uploadRate").toInt());
- btSession_.setUploadRateLimit(settings_.value("network/downloadRate").toInt());
+ btSession_.setDownloadRateLimit(settings_.value("network/downloadRate").toInt());
// If session pointer was given, apply settings immediately.
if (btSession_) {
btSession_->setUploadRateLimit(ulRate);
// If session pointer was given, apply settings immediately.
if (btSession_) {
btSession_->setUploadRateLimit(ulRate);
- btSession_->setDownloadrateLimit(dlRate);
+ btSession_->setDownloadRateLimit(dlRate);
void PreferencesDialog::ReadSettings()
{
dirLineEdit_->insert(settings_.value("download/directory").toString());
void PreferencesDialog::ReadSettings()
{
dirLineEdit_->insert(settings_.value("download/directory").toString());
- uploadRateSpinBox_->setValue(settings_.value("network/uploadRate").toInt());
- downloadRateSpinBox_->setValue(settings_.value("network/downloadRate").toInt());
+ uploadRateSpinBox_->setValue(settings_.value("network/uploadRate").toInt()/1000);
+ downloadRateSpinBox_->setValue(settings_.value("network/downloadRate").toInt()/1000);
// NOTE: We might need to call QSettigns::sync() here to instantly write settings.
// settings are written also by QSettings() destructor and by event loop at regular interval.
// NOTE: We might need to call QSettigns::sync() here to instantly write settings.
// settings are written also by QSettings() destructor and by event loop at regular interval.