diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-07-06 20:07:44 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-07-20 21:41:57 +0000 |
commit | 10376cbe5d653f1fd1a5554e00d288eaf3e94a78 (patch) | |
tree | f8f93d72927a3e1fc14a4861a39c12bc1143e1f2 /src/webenginewidgets/api/qwebenginepage.cpp | |
parent | 8f914155c4d32fd8befa01c6cc09957d082ca7fe (diff) |
Add threading and security note for print()
Adds note for QWebEnginePage::print(...) function.
Change-Id: I52ec78ccfc5c4eeb98ee69f9aaab01b380f97a81
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 10c9e586c..745ce03fc 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -2267,6 +2267,11 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res It is the users responsibility to ensure the \a printer remains valid until \a resultCallback has been called. + \note The rendering of the current content into a temporary PDF document is asynchronous and does + not block the main thread. However, the subsequent rendering of PDF into \a printer runs on the + main thread and will therefore block the event loop. Moreover, printing runs on the browser + process, which is by default not sandboxed. + The \a resultCallback must take a boolean as parameter. If printing was successful, this boolean will have the value \c true, otherwise, its value will be \c false. \since 5.8 |