mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07:00
Use cached SessionStatus and CacheStatus
This commit is contained in:
parent
cb678a254d
commit
8a6d8f3953
15 changed files with 171 additions and 360 deletions
|
@ -45,7 +45,8 @@
|
|||
ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
|
||||
: QComboBox(parent)
|
||||
, m_menu(menu)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
void ComboBoxMenuButton::showPopup()
|
||||
{
|
||||
|
@ -134,20 +135,20 @@ void SpeedWidget::update()
|
|||
{
|
||||
while (m_isUpdating) {
|
||||
|
||||
BitTorrent::SessionStatus btStatus = BitTorrent::Session::instance()->status();
|
||||
const BitTorrent::SessionStatus &btStatus = BitTorrent::Session::instance()->status();
|
||||
|
||||
SpeedPlotView::PointData point;
|
||||
point.x = QDateTime::currentDateTime().toTime_t();
|
||||
point.y[SpeedPlotView::UP] = btStatus.uploadRate();
|
||||
point.y[SpeedPlotView::DOWN] = btStatus.downloadRate();
|
||||
point.y[SpeedPlotView::PAYLOAD_UP] = btStatus.payloadUploadRate();
|
||||
point.y[SpeedPlotView::PAYLOAD_DOWN] = btStatus.payloadDownloadRate();
|
||||
point.y[SpeedPlotView::OVERHEAD_UP] = btStatus.ipOverheadUploadRate();
|
||||
point.y[SpeedPlotView::OVERHEAD_DOWN] = btStatus.ipOverheadDownloadRate();
|
||||
point.y[SpeedPlotView::DHT_UP] = btStatus.dhtUploadRate();
|
||||
point.y[SpeedPlotView::DHT_DOWN] = btStatus.dhtDownloadRate();
|
||||
point.y[SpeedPlotView::TRACKER_UP] = btStatus.trackerUploadRate();
|
||||
point.y[SpeedPlotView::TRACKER_DOWN] = btStatus.trackerDownloadRate();
|
||||
point.y[SpeedPlotView::UP] = btStatus.uploadRate;
|
||||
point.y[SpeedPlotView::DOWN] = btStatus.downloadRate;
|
||||
point.y[SpeedPlotView::PAYLOAD_UP] = btStatus.payloadUploadRate;
|
||||
point.y[SpeedPlotView::PAYLOAD_DOWN] = btStatus.payloadDownloadRate;
|
||||
point.y[SpeedPlotView::OVERHEAD_UP] = btStatus.ipOverheadUploadRate;
|
||||
point.y[SpeedPlotView::OVERHEAD_DOWN] = btStatus.ipOverheadDownloadRate;
|
||||
point.y[SpeedPlotView::DHT_UP] = btStatus.dhtUploadRate;
|
||||
point.y[SpeedPlotView::DHT_DOWN] = btStatus.dhtDownloadRate;
|
||||
point.y[SpeedPlotView::TRACKER_UP] = btStatus.trackerUploadRate;
|
||||
point.y[SpeedPlotView::TRACKER_DOWN] = btStatus.trackerDownloadRate;
|
||||
|
||||
m_plot->pushPoint(point);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue