Display transfer speeds at the beginning of the window title

The speeds are more likely to be displayed if the title is cut
in the window list.
This commit is contained in:
Christophe Dumez 2011-08-02 18:54:25 +03:00
parent d4d3991795
commit f2e222adb1
2 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,6 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.9.0
- COSMETIC: Display speed at the beginning of the Window title
* Thu Jun 02 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.8.0
- FEATURE: Added full libtorrent v0.16 support (uTP, ...)
- FEATURE: Proxy can be disabled for peer connections

View file

@ -1106,7 +1106,7 @@ void MainWindow::updateGUI() {
systrayIcon->setToolTip(html); // tray icon
}
if(displaySpeedInTitle) {
setWindowTitle(tr("qBittorrent %1 (Down: %2/s, Up: %3/s)", "%1 is qBittorrent version").arg(QString::fromUtf8(VERSION)).arg(misc::friendlyUnit(QBtSession::instance()->getSessionStatus().payload_download_rate)).arg(misc::friendlyUnit(QBtSession::instance()->getSessionStatus().payload_upload_rate)));
setWindowTitle(tr("[D: %1/s, U: %2/s] qBittorrent %3", "D = Download; U = Upload; %3 is qBittorrent version").arg(misc::friendlyUnit(QBtSession::instance()->getSessionStatus().payload_download_rate)).arg(misc::friendlyUnit(QBtSession::instance()->getSessionStatus().payload_upload_rate)).arg(QString::fromUtf8(VERSION)));
}
}