mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
Merge pull request #5882 from onto/pvs-studio
Fixes and improvements after check by PVS-Studio
This commit is contained in:
@@ -194,7 +194,7 @@ void PropertiesWidget::showPiecesAvailability(bool show)
|
||||
avail_pieces_lbl->setVisible(show);
|
||||
pieces_availability->setVisible(show);
|
||||
avail_average_lbl->setVisible(show);
|
||||
if (show || (!show && !downloaded_pieces->isVisible()))
|
||||
if (show || !downloaded_pieces->isVisible())
|
||||
line_2->setVisible(show);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void PropertiesWidget::showPiecesDownloaded(bool show)
|
||||
downloaded_pieces_lbl->setVisible(show);
|
||||
downloaded_pieces->setVisible(show);
|
||||
progress_lbl->setVisible(show);
|
||||
if (show || (!show && !pieces_availability->isVisible()))
|
||||
if (show || !pieces_availability->isVisible())
|
||||
line_2->setVisible(show);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ void FeedListWidget::itemAboutToBeRemoved(QTreeWidgetItem *item) {
|
||||
Rss::FilePtr file = m_rssMapping.take(item);
|
||||
if (Rss::FeedPtr feed = qSharedPointerDynamicCast<Rss::Feed>(file)) {
|
||||
m_feedsItems.remove(feed->id());
|
||||
} if (Rss::FolderPtr folder = qSharedPointerDynamicCast<Rss::Folder>(file)) {
|
||||
} else if (Rss::FolderPtr folder = qSharedPointerDynamicCast<Rss::Folder>(file)) {
|
||||
Rss::FeedList feeds = folder->getAllFeeds();
|
||||
foreach (const Rss::FeedPtr& feed, feeds) {
|
||||
m_feedsItems.remove(feed->id());
|
||||
|
||||
@@ -131,7 +131,7 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
||||
const bool seedingR = (prioR < 0);
|
||||
|
||||
bool activeR = TorrentFilter::ActiveTorrent.match(model->torrentHandle(model->index(right.row())));
|
||||
bool activeL = TorrentFilter::ActiveTorrent.match(model->torrentHandle(model->index(right.row())));
|
||||
bool activeL = TorrentFilter::ActiveTorrent.match(model->torrentHandle(model->index(left.row())));
|
||||
|
||||
// Sorting rules prioritized.
|
||||
// 1. Active torrents at the top
|
||||
|
||||
Reference in New Issue
Block a user