Bug 405011 - KHTMLView::print() could not share printer instance
Summary: KHTMLView::print() could not share printer instance
Status: RESOLVED FIXED
Alias: None
Product: frameworks-khtml
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other All
: NOR major
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-03 01:07 UTC by Ralf Habacker
Modified: 2019-10-21 19:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.64.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-03-03 01:07:58 UTC
For applications that use other KHTMLView, it is not possible with the current implementation of KHTMLView::print() to support common print settings within an application, since a separate QPainter instance is used internally (see https://api.kde.org/frameworks/khtml/html/khtmlview_8cpp_source.html#l#l03128). 

OBSERVED RESULT
When printing KHTMLView based pages, it is necessary to make necessary adjustments before each printout, which is not user friendly.

EXPECTED RESULT
Print settings should only need to be changed once in an application, even when multiple prints are used.

SOFTWARE/OS VERSIONS
All platforms

ADDITIONAL INFORMATION
KHTMLView::print() would have to be extended to use a predefined QPrinter instance.
Comment 1 Ralf Habacker 2019-10-14 10:48:02 UTC
For a related reqiew request see https://phabricator.kde.org/D19504
Comment 2 Ralf Habacker 2019-10-21 19:10:12 UTC
Git commit 2d8cba0507291991c2421963ff23fbba65604e43 by Ralf Habacker.
Committed on 21/10/2019 at 19:12.
Pushed by habacker into branch 'master'.

Extend KHtmlView::print() to use a predefined QPrinter instance

This is required to share printer settings inside an application.
FIXED-IN:5.64.0
Test Plan: compile on linux
Reviewed By: dfaure
Differential Revision: https://phabricator.kde.org/D19504

M  +7    -1    src/khtmlview.cpp
M  +10   -0    src/khtmlview.h

https://commits.kde.org/khtml/2d8cba0507291991c2421963ff23fbba65604e43