mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08: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);
|
||||
|
||||
// * Add trackers
|
||||
m_additionalTrackers.empty();
|
||||
m_additionalTrackers.clear();
|
||||
if (pref->isAddTrackersEnabled()) {
|
||||
foreach (QString tracker, pref->getTrackersList().split("\n")) {
|
||||
tracker = tracker.trimmed();
|
||||
|
@ -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
|
||||
|
||||
|
@ -44,6 +44,7 @@ DownloadRule::DownloadRule()
|
||||
: m_enabled(false)
|
||||
, m_useRegex(false)
|
||||
, m_apstate(USE_GLOBAL)
|
||||
, m_ignoreDays(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user