[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdelibs/khtml/rendering
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2010-02-24 2:14:46
Message-ID: 1266977686.914281.20789.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1095342 by ggarand:

automatically merged revision 1088979:
great, looks like these two Qt regressions have finally been fixed,
so we can enable back the optimized code and close all the printing bugs
that closing/restoring the QPainter triggered

I'll do that in two commits so that problems can be pin-pointed :

1) stop ending the QPainter before painting widgets to buffers,
 it's not needed anymore and Qt has poor support for that.

 Fixes printing on pages with form widgets.

BUG: 197402
BUG: 214352

 M  +4 -10     render_replaced.cpp  


--- branches/KDE/4.4/kdelibs/khtml/rendering/render_replaced.cpp #1095341:1095342
@@ -693,14 +693,9 @@
             pp.fillRect(r, Qt::transparent);
         }
         d = pm;
+    } else {
+        p->end();
     }
-    // Qt 4.4 regression #1: 
-    // can't let a painter active on the view as Qt thinks it is opened on the *pixmap*
-    // and prints "paint device can only be painted by one painter at a time" warnings.
-    //
-    // Testcase: paintEvent(...) { QPainter p(this); aChildWidget->render( aPixmapTarget, ...); }
-    //
-    p->end();
 
     setInPaintEventFlag( widget, false );
 
@@ -708,7 +703,7 @@
 
     setInPaintEventFlag( widget );
 
-//    if (!buffered) {
+    if (!buffered) {
         p->begin(x);
         p->setWorldTransform(t);
         p->setWindow(w);
@@ -721,8 +716,7 @@
             p->setOpacity(op);
         p->setPen(pen);
         p->setBrush(brush);
-//    } else {
-    if (buffered) {
+    } else {
         // transfer results
         QPoint off(r.x(), r.y());
         p->drawPixmap(thePoint+off, static_cast<QPixmap&>(*d), r);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic