[Webkit-unassigned] [Bug 26584] [Qt] Printing extra information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 24 07:39:39 PDT 2009


treat at kde.org changed:

           What    |Removed                     |Added
  Attachment #31643|review?                     |review-
               Flag|                            |

------- Comment #6 from treat at kde.org  2009-06-24 07:39 PDT -------
(From update of attachment 31643)
I'll just say at the outlet that I don't think this new API is appropriate or
necessary.  I think the answer you are seeking is to just forgo the convenience
API that QWebView/QWebFrame allows for printing and do the heavy lifting
yourself.  It sounds like you are writing a specific application that has
demands above and beyond what the convenience API allows.  I believe you can
still accomplish your goals by using QWebFrame::render directly to draw the
entire page to a QImage for instance.  And then, in your client code, you can
do the heavy lifting of breaking up this QImage and sending it to the QPrinter.

That said, there were a number of problems with the patch still:

> +        Added an overloared QWebFrame::print allowing one to use an
> +        existing painter object.  

Spelling mistake.

> +unsigned int QWebFrame::countPages(QPrinter *printer) const {

I guess this should return a quint32?

> +    This allows to print multiple pages into on job.

Spelling mistake.

> +void QWebFrame::print(QPrinter* printer, QPainter* painter) const
> +{
> +    if(!painter->isActive() && !painter.begin(printer))  
>          return;

This looks wrong.  Why the check for painter->isActive() and why the && logic?

> +    This signal is emitted when when a page is printed. This allows one


> +    void printingNewPage(QPrinter* printer, int fromPage, int toPage, int page) const;

Coding style issues with * decoration.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list