summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-03-31 17:36:22 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2016-06-16 15:53:32 +0000
commit3398abfc1b5b789d11592aada0b5860e36a50041 (patch)
tree0c18602e09e9f3a250d8de6fa8618e2895aa07dc /src/core/web_contents_adapter.cpp
parent939d104cc5a8208a0bef94ca14889ccd584a3526 (diff)
Introduce QWebEnginePage::save
Add the convenience method QWebEnginePage::save for saving pages without the need to explicitly handle download requests. Task-number: QTBUG-51798 Change-Id: I8910ce8cb7c9370d72f2b209c4d2de07c614f6d6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 15125b9d8..e37a3ad24 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -535,9 +535,10 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT
d->webContents->Unselect();
}
-void WebContentsAdapter::save()
+void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
{
Q_D(WebContentsAdapter);
+ d->webContentsDelegate->setSavePageInfo(SavePageInfo(filePath, savePageFormat));
d->webContents->OnSavePage();
}