mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
- Kept on working on bandwidth allocation per torrent
- Fixed a crash in search engine when systray integration was disabled
This commit is contained in:
@@ -58,6 +58,7 @@ class BandwidthAllocationDialog : public QDialog, private Ui_bandwidth_dlg {
|
||||
// val = -1;
|
||||
// bandwidthSlider->setValue(val);
|
||||
// }
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(setBandwidth()));
|
||||
}
|
||||
|
||||
~BandwidthAllocationDialog(){
|
||||
@@ -75,6 +76,15 @@ class BandwidthAllocationDialog : public QDialog, private Ui_bandwidth_dlg {
|
||||
}
|
||||
}
|
||||
|
||||
void setBandwidth(){
|
||||
int val = bandwidthSlider->value();
|
||||
if(uploadMode)
|
||||
h.set_upload_limit(val);
|
||||
else
|
||||
h.set_download_limit(val);
|
||||
close();
|
||||
}
|
||||
|
||||
private:
|
||||
bool uploadMode;
|
||||
bittorrent *BTSession;
|
||||
|
||||
Reference in New Issue
Block a user