summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-03-17 13:47:07 +0100
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-04-07 11:18:19 +0000
commitd8daba265ba260b41899fe817ee0fb8833441979 (patch)
tree2eb09845f07caec817ec7692dbf7ec75c160f901 /src/core
parent4b54390776be207d64852e560f323deef7b0b7fc (diff)
Revive ReloadAndBypassCache
Appears to be an oversight for widgets, as the API was there, but just wasn't wired. Also add it for QQuickWebEngineView while we're at it. Change-Id: I07d6e356cbaf22b79f3fc5a82df78c6821993e8d Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_contents_adapter.cpp7
-rw-r--r--src/core/web_contents_adapter.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index c5cd83c6e..2ccaf399c 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -454,6 +454,13 @@ void WebContentsAdapter::reload()
d->webContents->Focus();
}
+void WebContentsAdapter::reloadAndBypassCache()
+{
+ Q_D(WebContentsAdapter);
+ d->webContents->GetController().ReloadIgnoringCache(/*checkRepost = */false);
+ d->webContents->Focus();
+}
+
void WebContentsAdapter::load(const QUrl &url)
{
// The situation can occur when relying on the editingFinished signal in QML to set the url
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index f4b434353..5ea55c1b8 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -74,6 +74,7 @@ public:
bool canGoForward() const;
void stop();
void reload();
+ void reloadAndBypassCache();
void load(const QUrl&);
void setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl);
QUrl activeUrl() const;