mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix NetworkCookieJar::deleteCookie() behavior to match Qt5 one
This commit is contained in:
parent
cf25ed3d80
commit
4965704b10
1 changed files with 13 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue