Merge pull request #5882 from onto/pvs-studio

Fixes and improvements after check by PVS-Studio
This commit is contained in:
sledgehammer999
2016-11-07 00:18:46 +02:00
committed by GitHub
5 changed files with 13 additions and 13 deletions

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -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