Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide zero and infinity values in peer list only when that setting is set to Always #22205

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

thalieht
Copy link
Contributor

Closes #21998.

@thalieht thalieht added the GUI GUI-related issues/changes label Jan 25, 2025
@glassez glassez added this to the 5.0.4 milestone Jan 25, 2025
@@ -420,7 +420,8 @@ void PeerListWidget::loadPeers(const BitTorrent::Torrent *torrent)
for (auto i = m_peerItems.cbegin(); i != m_peerItems.cend(); ++i)
existingPeers.insert(i.key());

const bool hideZeroValues = Preferences::instance()->getHideZeroValues();
const Preferences *pref = Preferences::instance();
const bool hideZeroValues = (pref->getHideZeroValues() && (pref->getHideZeroComboValues() == 0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice to refactor it further in order to have single accessor using enum type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice to refactor it further in order to have single accessor using enum type.

Unfortunately i don't know what this means.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice to refactor it further in order to have single accessor using enum type.

Unfortunately i don't know what this means.

This is more of a note for myself...

@glassez glassez merged commit bb4a668 into qbittorrent:master Jan 27, 2025
14 checks passed
@glassez
Copy link
Member

glassez commented Jan 27, 2025

@thalieht
Thank you!

glassez pushed a commit to glassez/qBittorrent that referenced this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI GUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Hide zero and infinity values: Stopped torrents only" hides zero values in Peers tab for active torrents
4 participants