summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
authorMichael Brüning <michael.bruning@qt.io>2018-02-26 14:38:13 +0100
committerKai Koehne <kai.koehne@qt.io>2018-03-06 07:26:35 +0000
commit66a6518422bb32a85a481088a213a790ffd48785 (patch)
tree920945700398fa97a6f8e734137971ca16c1d910 /src/core/web_contents_adapter.h
parent0d9ba4179245d89e163494ea0a3652e790ec08a0 (diff)
Explicitly use custom margins for printing to pdf
3cec2ccb0ffdd41a41ab55d4c1ba88d4866e71d1 introduced a regression because it was assumed that the page was only printed to pdf when a filename was given. This is not the case when the pdf data is handed to the callback, though. Correct this by explicitly stating when margins should be used. Task-number: QTBUG-66654 Change-Id: I663f578ff5d01c77cc62e6f3756a17f78168a9aa Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index 9ce438119..367e44397 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -179,7 +179,9 @@ public:
void endDragging(const QPoint &clientPos, const QPoint &screenPos);
void leaveDrag();
void printToPDF(const QPageLayout&, const QString&);
- quint64 printToPDFCallbackResult(const QPageLayout &, const bool colorMode = true);
+ quint64 printToPDFCallbackResult(const QPageLayout &,
+ bool colorMode = true,
+ bool useCustomMargins = true);
// meant to be used within WebEngineCore only
content::WebContents *webContents() const;