mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Optimized transfer list repainting
Improved user friendliness of data units
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
- BUGFIX: Force a recheck after renaming files to avoid overwriting
|
- BUGFIX: Force a recheck after renaming files to avoid overwriting
|
||||||
- BUGFIX: Improve "Open destination folder" behavior
|
- BUGFIX: Improve "Open destination folder" behavior
|
||||||
- BUGFIX: Fix race condition in RSS that could cause a crash on startup
|
- BUGFIX: Fix race condition in RSS that could cause a crash on startup
|
||||||
|
- BUGFIX: Improved user friendlyness of size units
|
||||||
|
- BUGFIX: Optimized transfer list repainting
|
||||||
- COSMETIC: Improved transfer speed display in peers list
|
- COSMETIC: Improved transfer speed display in peers list
|
||||||
|
|
||||||
* Wed Jan 20 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.1
|
* Wed Jan 20 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.1
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ public:
|
|||||||
return tr("Unknown", "Unknown (size)");
|
return tr("Unknown", "Unknown (size)");
|
||||||
const QString units[5] = {tr("B", "bytes"), tr("KiB", "kibibytes (1024 bytes)"), tr("MiB", "mebibytes (1024 kibibytes)"), tr("GiB", "gibibytes (1024 mibibytes)"), tr("TiB", "tebibytes (1024 gibibytes)")};
|
const QString units[5] = {tr("B", "bytes"), tr("KiB", "kibibytes (1024 bytes)"), tr("MiB", "mebibytes (1024 kibibytes)"), tr("GiB", "gibibytes (1024 mibibytes)"), tr("TiB", "tebibytes (1024 gibibytes)")};
|
||||||
char i = 0;
|
char i = 0;
|
||||||
while(val > 1024. && i++<6)
|
while(val >= 1024. && i++<6)
|
||||||
val /= 1024.;
|
val /= 1024.;
|
||||||
return QString(QByteArray::number(val, 'f', 1)) + " " + units[(int)i];
|
return QString(QByteArray::number(val, 'f', 1)) + " " + units[(int)i];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -443,6 +443,8 @@ void TransferListWidget::setRefreshInterval(int t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::refreshList() {
|
void TransferListWidget::refreshList() {
|
||||||
|
// Stop updating the display
|
||||||
|
setUpdatesEnabled(false);
|
||||||
// Refresh only if displayed
|
// Refresh only if displayed
|
||||||
if(main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
|
if(main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
|
||||||
unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0;
|
unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0;
|
||||||
@@ -498,6 +500,8 @@ void TransferListWidget::refreshList() {
|
|||||||
}
|
}
|
||||||
// Update status filters counters
|
// Update status filters counters
|
||||||
emit torrentStatusUpdate(nb_downloading, nb_seeding, nb_active, nb_inactive);
|
emit torrentStatusUpdate(nb_downloading, nb_seeding, nb_active, nb_inactive);
|
||||||
|
// Start updating the display
|
||||||
|
setUpdatesEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TransferListWidget::getRowFromHash(QString hash) const{
|
int TransferListWidget::getRowFromHash(QString hash) const{
|
||||||
|
|||||||
Reference in New Issue
Block a user