From 75bdfe971b7bd7c7c7c6032776f095ee566f3033 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 16 Apr 2016 12:25:56 +0800 Subject: [PATCH 1/3] Fix warnings in mainwindow.ui. Closes #5117. gui/mainwindow.ui: Warning: The name 'actionExecutionLogs' (QAction) is already in use, defaulting to 'actionExecutionLogs1'. gui/mainwindow.ui: Warning: action `actionSearch_engine' not declared gui/mainwindow.ui: Warning: action `actionRSS_Reader' not declared --- src/gui/mainwindow.ui | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui index 8833c3c16..c3646c401 100644 --- a/src/gui/mainwindow.ui +++ b/src/gui/mainwindow.ui @@ -35,7 +35,7 @@ 0 0 914 - 21 + 23 @@ -108,8 +108,6 @@ - - @@ -355,17 +353,6 @@ P&ause All - - - true - - - &Log - - - Execution Log - - true From a12d82524a755482bbff8886db7cb7ca5633defd Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 16 Apr 2016 12:30:49 +0800 Subject: [PATCH 2/3] Fix class member initialize order --- src/base/bittorrent/torrenthandle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 7881fe21b..7fd86e9cc 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -199,10 +199,10 @@ TorrentHandle::TorrentHandle(Session *session, const libtorrent::torrent_handle , m_nativeHandle(nativeHandle) , m_state(TorrentState::Unknown) , m_renameCount(0) + , m_useASM(data.savePath.isEmpty()) , m_name(data.name) , m_savePath(Utils::Fs::toNativePath(data.savePath)) , m_category(data.category) - , m_useASM(data.savePath.isEmpty()) , m_hasSeedStatus(data.hasSeedStatus) , m_ratioLimit(data.ratioLimit) , m_tempPathDisabled(data.disableTempPath) From 7d5ab68f5085d66e9286841c5442a284d3d2aa0f Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 16 Apr 2016 12:37:23 +0800 Subject: [PATCH 3/3] Fix Coverity Scan cid 143911. `filesCount()` could return a negative value. --- src/gui/torrentcontentmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index 6eb69f57a..7324532de 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -285,7 +285,7 @@ void TorrentContentModel::clear() void TorrentContentModel::setupModelData(const BitTorrent::TorrentInfo &info) { qDebug("setup model data called"); - if (info.filesCount() == 0) + if (info.filesCount() <= 0) return; emit layoutAboutToBeChanged();