mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Fix NetworkCookieJar::deleteCookie() behavior to match Qt5 one
This commit is contained in:
committed by
sledgehammer999
parent
5dc9b5c2dd
commit
a0ae21148a
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user