refact: Resolve coding style comments.

This commit is contained in:
Stiliyan Tonev (Bark) 2025-06-05 09:02:18 +03:00
commit 5d3a7da689
2 changed files with 3 additions and 3 deletions

View file

@ -158,7 +158,7 @@ namespace
void applyToTorrents(const QStringList &idList, Func func) void applyToTorrents(const QStringList &idList, Func func)
requires std::invocable<Func, BitTorrent::Torrent *> requires std::invocable<Func, BitTorrent::Torrent *>
{ {
if ((idList.size() == 1) && (idList[0] == u"all" || idList[0] == u"*")) if ((idList.size() == 1) && ((idList[0] == u"all") || (idList[0] == u"*")))
{ {
for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents())) for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
func(torrent); func(torrent);

View file

@ -178,10 +178,10 @@ window.qBittorrent.PropTrackers ??= (() => {
}); });
const addTrackerFN = () => { const addTrackerFN = () => {
const selectedTorrents = torrentsTable.selectedRowsIds();
if (current_hash.length === 0) if (current_hash.length === 0)
return; return;
const selectedTorrents = torrentsTable.selectedRowsIds();
if (selectedTorrents.length !== 0) if (selectedTorrents.length !== 0)
current_hash = selectedTorrents.map(encodeURIComponent).join("|"); current_hash = selectedTorrents.map(encodeURIComponent).join("|");
@ -231,10 +231,10 @@ window.qBittorrent.PropTrackers ??= (() => {
}; };
const removeTrackerFN = (element) => { const removeTrackerFN = (element) => {
const selectedTorrents = torrentsTable.selectedRowsIds();
if (current_hash.length === 0) if (current_hash.length === 0)
return; return;
const selectedTorrents = torrentsTable.selectedRowsIds();
if (selectedTorrents.length !== 0) if (selectedTorrents.length !== 0)
current_hash = selectedTorrents.map(encodeURIComponent).join("|"); current_hash = selectedTorrents.map(encodeURIComponent).join("|");