diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2015-12-10 07:05:29 -0800 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2016-01-06 08:06:33 +0000 |
commit | f5ed13b1e2d20ca49adb6fa378faee14bece16a0 (patch) | |
tree | 70dbd031d4a59a8b5031fc93795f5a08ac715c65 /src/webengine | |
parent | 1ae9e7cc00a366fddcb4909df375829e9727c7fa (diff) |
Add function to clear data from the cache
It marks the entries of the current cache backend for deletion
and starts to remove them.
Task-number: QTBUG-48177
Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/api/qquickwebengineprofile.cpp | 14 | ||||
-rw-r--r-- | src/webengine/api/qquickwebengineprofile_p.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 0c3f7400b..6df16bf54 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -436,6 +436,20 @@ QWebEngineCookieStore *QQuickWebEngineProfile::cookieStore() const return d->browserContext()->cookieStore(); } +/*! + \qmlmethod void WebEngineProfile::clearHttpCache() + \since QtWebEngine 1.3 + + Removes the profile's cache entries. + + \sa WebEngineProfile::cachePath +*/ +void QQuickWebEngineProfile::clearHttpCache() +{ + Q_D(QQuickWebEngineProfile); + d->browserContext()->clearHttpCache(); +} + QQuickWebEngineSettings *QQuickWebEngineProfile::settings() const { const Q_D(QQuickWebEngineProfile); diff --git a/src/webengine/api/qquickwebengineprofile_p.h b/src/webengine/api/qquickwebengineprofile_p.h index 5839d51a5..2744ed0ec 100644 --- a/src/webengine/api/qquickwebengineprofile_p.h +++ b/src/webengine/api/qquickwebengineprofile_p.h @@ -123,6 +123,7 @@ public: static QQuickWebEngineProfile *defaultProfile(); Q_REVISION(1) Q_INVOKABLE QWebEngineCookieStore *cookieStore() const; + Q_REVISION(2) Q_INVOKABLE void clearHttpCache(); signals: void storageNameChanged(); |