mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 16:57:55 +00:00
Merge pull request #4553 from glassez/fixes
Fix some bugs (reported by Coverity Scan for the most part)
This commit is contained in:
commit
909fc3fa50
@ -576,7 +576,7 @@ void Session::configure()
|
|||||||
m_nativeSession->set_pe_settings(encryptionSettings);
|
m_nativeSession->set_pe_settings(encryptionSettings);
|
||||||
|
|
||||||
// * Add trackers
|
// * Add trackers
|
||||||
m_additionalTrackers.empty();
|
m_additionalTrackers.clear();
|
||||||
if (pref->isAddTrackersEnabled()) {
|
if (pref->isAddTrackersEnabled()) {
|
||||||
foreach (QString tracker, pref->getTrackersList().split("\n")) {
|
foreach (QString tracker, pref->getTrackersList().split("\n")) {
|
||||||
tracker = tracker.trimmed();
|
tracker = tracker.trimmed();
|
||||||
|
@ -79,8 +79,19 @@ namespace
|
|||||||
virtual bool deleteCookie(const QNetworkCookie &cookie)
|
virtual bool deleteCookie(const QNetworkCookie &cookie)
|
||||||
{
|
{
|
||||||
auto myCookies = allCookies();
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ DownloadRule::DownloadRule()
|
|||||||
: m_enabled(false)
|
: m_enabled(false)
|
||||||
, m_useRegex(false)
|
, m_useRegex(false)
|
||||||
, m_apstate(USE_GLOBAL)
|
, m_apstate(USE_GLOBAL)
|
||||||
|
, m_ignoreDays(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,9 @@
|
|||||||
SearchWidget::SearchWidget(MainWindow *mainWindow)
|
SearchWidget::SearchWidget(MainWindow *mainWindow)
|
||||||
: QWidget(mainWindow)
|
: QWidget(mainWindow)
|
||||||
, m_mainWindow(mainWindow)
|
, m_mainWindow(mainWindow)
|
||||||
|
, m_isNewQueryString(false)
|
||||||
|
, m_noSearchResults(true)
|
||||||
|
, m_nbSearchResults(0)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user