Remove usage of deprecated functions

Also use proper type for storing date/time data
This commit is contained in:
Chocobo1
2018-03-09 01:38:03 +08:00
parent a3d9e457a0
commit fdf3ebbb6c
6 changed files with 11 additions and 11 deletions

View File

@@ -137,7 +137,7 @@ void SpeedWidget::update()
const BitTorrent::SessionStatus &btStatus = BitTorrent::Session::instance()->status();
SpeedPlotView::PointData point;
point.x = QDateTime::currentDateTime().toTime_t();
point.x = QDateTime::currentMSecsSinceEpoch() / 1000;
point.y[SpeedPlotView::UP] = btStatus.uploadRate;
point.y[SpeedPlotView::DOWN] = btStatus.downloadRate;
point.y[SpeedPlotView::PAYLOAD_UP] = btStatus.payloadUploadRate;