diff options
| author | Brian Munro <brian.alexander.munro@gmail.com> | 2018-03-05 11:35:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-05 11:35:58 +0200 |
| commit | c7e1d9738f06c6c6e7c9b41cdd8d35062d7c06b6 (patch) | |
| tree | c9c92380fcc82a64df8956face14e22bc3d2b4f7 /src/persistentcookiejar.cpp | |
| parent | 7dfe0c9a8feae35ba7554493eea4fdb4e33a64d3 (diff) | |
| parent | a540a542a47fe75d0d0e4594158422aef4340b3a (diff) | |
Merge pull request #252 from LePresidente/new_vfs_library
Update master to latest stable code.
Diffstat (limited to 'src/persistentcookiejar.cpp')
| -rw-r--r-- | src/persistentcookiejar.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/persistentcookiejar.cpp b/src/persistentcookiejar.cpp index 6ca0de39..a6eb78fa 100644 --- a/src/persistentcookiejar.cpp +++ b/src/persistentcookiejar.cpp @@ -15,6 +15,12 @@ PersistentCookieJar::~PersistentCookieJar() { save();
}
+void PersistentCookieJar::clear() {
+ for (const QNetworkCookie &cookie : allCookies()) {
+ deleteCookie(cookie);
+ }
+}
+
void PersistentCookieJar::save() {
QTemporaryFile file;
if (!file.open()) {
@@ -26,7 +32,7 @@ void PersistentCookieJar::save() { QList<QNetworkCookie> cookies = allCookies();
data << static_cast<quint32>(cookies.size());
- foreach (const QNetworkCookie &cookie, allCookies()) {
+ for (const QNetworkCookie &cookie : allCookies()) {
data << cookie.toRawForm();
}
|
