Browse Source

Merge pull request #4553 from glassez/fixes

Fix some bugs (reported by Coverity Scan for the most part)
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
909fc3fa50
  1. 2
      src/base/bittorrent/session.cpp
  2. 15
      src/base/net/downloadmanager.cpp
  3. 1
      src/base/rss/rssdownloadrule.cpp
  4. 3
      src/gui/search/searchwidget.cpp

2
src/base/bittorrent/session.cpp

@ -576,7 +576,7 @@ void Session::configure() @@ -576,7 +576,7 @@ void Session::configure()
m_nativeSession->set_pe_settings(encryptionSettings);
// * Add trackers
m_additionalTrackers.empty();
m_additionalTrackers.clear();
if (pref->isAddTrackersEnabled()) {
foreach (QString tracker, pref->getTrackersList().split("\n")) {
tracker = tracker.trimmed();

15
src/base/net/downloadmanager.cpp

@ -79,8 +79,19 @@ namespace @@ -79,8 +79,19 @@ namespace
virtual bool deleteCookie(const QNetworkCookie &cookie)
{
auto myCookies = allCookies();
myCookies.removeAll(cookie);
setAllCookies(myCookies);
QList<QNetworkCookie>::Iterator it;
for (it = myCookies.begin(); it != myCookies.end(); ++it) {
if ((it->name() == cookie.name())
&& (it->domain() == cookie.domain())
&& (it->path() == cookie.path())) {
myCookies.erase(it);
setAllCookies(myCookies);
return true;
}
}
return false;
}
#endif

1
src/base/rss/rssdownloadrule.cpp

@ -44,6 +44,7 @@ DownloadRule::DownloadRule() @@ -44,6 +44,7 @@ DownloadRule::DownloadRule()
: m_enabled(false)
, m_useRegex(false)
, m_apstate(USE_GLOBAL)
, m_ignoreDays(0)
{
}

3
src/gui/search/searchwidget.cpp

@ -72,6 +72,9 @@ @@ -72,6 +72,9 @@
SearchWidget::SearchWidget(MainWindow *mainWindow)
: QWidget(mainWindow)
, m_mainWindow(mainWindow)
, m_isNewQueryString(false)
, m_noSearchResults(true)
, m_nbSearchResults(0)
{
setupUi(this);

Loading…
Cancel
Save