Merge pull request #4553 from glassez/fixes

Fix some bugs (reported by Coverity Scan for the most part)
This commit is contained in:
sledgehammer999 2016-01-13 17:15:02 -06:00
commit 909fc3fa50
4 changed files with 18 additions and 3 deletions

View File

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

View File

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

View File

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

View File

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