Browse Source

Fix NetworkCookieJar::deleteCookie() behavior to match Qt5 one

adaptive-webui-19844
Vladimir Golovnev (Glassez) 9 years ago
parent
commit
4965704b10
  1. 13
      src/base/net/downloadmanager.cpp

13
src/base/net/downloadmanager.cpp

@ -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);
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); setAllCookies(myCookies);
return true;
}
}
return false;
} }
#endif #endif

Loading…
Cancel
Save