Closed sakkamade closed 4 years ago
There's two issues in one here!!!
Hide zero values in Peers window when Hide zero and infinity values is checked.
The zero/infinity value will only be invisible if seeds/peers have 0 values ie 0(0) not like 0(4) & have 0 for download/upload speed!
your screenshot shows that qBittorrent is doing exactly what it is meant to be doing....
see my screenshots below for examples, unless you are expecting to see something different.....(you will have to be more specific)
Show flags properly,
This should be a different issue.......anyway....can you explain what you see as an issue?
@xavier2k6 I meant since Actions in FranciscoPombal's fork
I can reproduce this; tested using the latest experimental Windows build targeting the master
branch at the time of writing on Windows 10: https://github.com/qbittorrent/qBittorrent/actions/runs/297092787 (@roshiajin-kunai please use builds from https://github.com/qbittorrent/qBittorrent/actions for testing from now on, not the ones from my personal fork/branches and mention the commit/specific action run when indicating the version). I have not tested on other OSes.
In the most recent build:
Some flags are broken, such as the Brazilian and Spanish flags. They appear slightly glitched out, as in the OP's image.
When Hide zero and infinity values
is checked:
In both 4.2.5 and the most recent build, when Hide zero and infinity values
is checked:
Relevance
and Progress
columns in the peers tab don't hide 0.0%
values0
value for ETA are not hidden in the transfer listSeeds
and Peers
columns appear to behave correctly in the transfer list, i.e., they are only empty when the value is 0(0)
@xavier2k6 Problem is that in Peers window I see 0 B/s in speeds and 0 B in downloaded/uploaded.
While Hide is checked.
@FranciscoPombal Yes, I'm building from source for some time already.
Hong Kong's flag too, as I remember.
@FranciscoPombal @roshiajin-kunai apologies, I see what you mean now.
I think the portugal flag might have an issue too...
Build I'm using, is my own compiled version with Qt5.15.1
@FranciscoPombal download limit/upload limit don't hide infinity symbol either in transfer list
the flags issue is probably related to "GeoDB"??
the flags issue is probably related to "GeoDB"??
Could also be a bug/change in qt5-svg.
Looks like an accidental omission from #13157
@jagannatharjun should i make a PR with the following or you want to make one with something else (or even this if you want)?
--- a/src/gui/properties/peerlistwidget.cpp
+++ b/src/gui/properties/peerlistwidget.cpp
@@ -425,16 +425,21 @@ void PeerListWidget::updatePeer(const BitTorrent::TorrentHandle *torrent, const
}
const int row = (*itemIter)->row();
+ const bool hideValues = Preferences::instance()->getHideZeroValues();
setModelData(row, PeerListColumns::CONNECTION, peer.connectionType(), peer.connectionType());
setModelData(row, PeerListColumns::FLAGS, peer.flags(), peer.flags(), {}, peer.flagsDescription());
const QString client = peer.client().toHtmlEscaped();
setModelData(row, PeerListColumns::CLIENT, client, client);
setModelData(row, PeerListColumns::PROGRESS, (Utils::String::fromDouble(peer.progress() * 100, 1) + '%'), peer.progress(), intDataTextAlignment);
- setModelData(row, PeerListColumns::DOWN_SPEED, Utils::Misc::friendlyUnit(peer.payloadDownSpeed(), 1), peer.payloadDownSpeed(), intDataTextAlignment);
- setModelData(row, PeerListColumns::UP_SPEED, Utils::Misc::friendlyUnit(peer.payloadUpSpeed(), true), peer.payloadUpSpeed(), intDataTextAlignment);
- setModelData(row, PeerListColumns::TOT_DOWN, Utils::Misc::friendlyUnit(peer.totalDownload()), peer.totalDownload(), intDataTextAlignment);
- setModelData(row, PeerListColumns::TOT_UP, Utils::Misc::friendlyUnit(peer.totalUpload()), peer.totalUpload(), intDataTextAlignment);
+ const QString downSpeed = ((peer.payloadDownSpeed() <= 0) && hideValues) ? QString {} : Utils::Misc::friendlyUnit(peer.payloadDownSpeed(), true);
+ setModelData(row, PeerListColumns::DOWN_SPEED, downSpeed, peer.payloadDownSpeed(), intDataTextAlignment);
+ const QString upSpeed = ((peer.payloadUpSpeed() <= 0) && hideValues) ? QString {} : Utils::Misc::friendlyUnit(peer.payloadUpSpeed(), true);
+ setModelData(row, PeerListColumns::UP_SPEED, upSpeed, peer.payloadUpSpeed(), intDataTextAlignment);
+ const QString totalDown = ((peer.totalDownload() <= 0) && hideValues) ? QString {} : Utils::Misc::friendlyUnit(peer.totalDownload());
+ setModelData(row, PeerListColumns::TOT_DOWN, totalDown, peer.totalDownload(), intDataTextAlignment);
+ const QString totalUp = ((peer.totalUpload() <= 0) && hideValues) ? QString {} : Utils::Misc::friendlyUnit(peer.totalUpload());
+ setModelData(row, PeerListColumns::TOT_UP, totalUp, peer.totalUpload(), intDataTextAlignment);
setModelData(row, PeerListColumns::RELEVANCE, (Utils::String::fromDouble(peer.relevance() * 100, 1) + '%'), peer.relevance(), intDataTextAlignment);
const QStringList downloadingFiles {torrent->info().filesForPiece(peer.downloadingPieceIndex())};
download limit/upload limit don't hide infinity symbol either in transfer list
Maybe it was considered the same as ETA which unfortunately was a conscious decision https://github.com/qbittorrent/qBittorrent/pull/4675#issuecomment-174940336
@jagannatharjun should i make a PR
👍
download limit/upload limit don't hide infinity symbol either in transfer list
Maybe it was considered the same as ETA which unfortunately was a conscious decision #4675 (comment)
Ah, maybe so........perhaps the other dev's can confirm/have their say on whether it should stay as is or be changed...(so it can be more clearer)
The part about the flags has been separated into its own issue report: https://github.com/qbittorrent/qBittorrent/issues/13497. @roshiajin-kunai next time please follow the one specific issue per submission
rule please.
Compiled with https://github.com/qbittorrent/qBittorrent/pull/13495 - merged. Zero values hides properly. Issue is fixed.
Thank you.
qBittorrent version and Operating System
4.3.0alpha1 Windows 10 version 1903
What is the problem
Hello.
I have bugs in peers window:
What is the expected behavior
Hide zero values in Peers window when Hide zero and infinity values is checked. Show flags properly,
Steps to reproduce
Update qBittorrent to 4.3.0alpha1 via replacing compiled
.exe
and.pdb
in...\Program Files\qBittorrent
folder.Extra info
Had these problems when tried FranciscoPombal's builds either.