[webkit-reviews] review granted: [Bug 26584] [Qt] Printing extra information : [Attachment 39514] My solution

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 12 06:44:46 PDT 2009


Jakob Truelsen <antialize at gmail.com> has granted  review:
Bug 26584: [Qt] Printing extra information
https://bugs.webkit.org/show_bug.cgi?id=26584

Attachment 39514: My solution
https://bugs.webkit.org/attachment.cgi?id=39514&action=review

------- Additional Comments from Jakob Truelsen <antialize at gmail.com>
This patch implements my solution. Ariya's proposal has the following
disadvantages:
* For Ariya's solution to work the print slot can no longer be const. The only
way it could be const, is to either duplicate the code or use const_cast.
* Printing state is stored in the QWebFrame, where I feel it does not belong.
* A lot of pointer magic is needed to store the state.
* All the added methods needs to have some document string stating that they
are only to be installed between begin and end
It has the following advantages
* No new classes are added

My solution has the following diadvantages
* A new class is added
* The QWebPrinterBeginCaller constructor is "clever code" and not very pretty.
It has the following advantages
* the print slot can stay const
* no printing state is stored in QWebFrame and as such one can make two print
jobs concurently. In the future I hope to have even more state added to
printing and as such this will not get into the QWebFrame.

My current solution no longer allows printing more document then one into a
print job, Ariya rightfully pointed out that that belongs elsewhere, and is
therefore quite simple.


More information about the webkit-reviews mailing list