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

List:       kde-commits
Subject:    KDE/kdelibs/khtml
From:       David Faure <faure () kde ! org>
Date:       2010-10-12 22:38:20
Message-ID: 20101012223820.EF8CEAC895 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1185322 by dfaure:

Fix warnings "QPainter::begin: Widget painting can only begin as a result of a paintEvent"
on pages with form widgets (testcase: https://bugs.kde.org/query.cgi).

The reason is that viewportEvent() is supposed to draw on the viewport,
but khtmlview would try to call paintEvent() to draw on widget() from there,
and QPainter didn't expect that, so nothing gets drawn anyway.
Clearly the painting is happening anyway, from the eventFilter on widget(),
so this isn't needed. Confirmed by Germain Garand long ago.


 M  +0 -11     khtmlview.cpp  


--- trunk/KDE/kdelibs/khtml/khtmlview.cpp #1185321:1185322
@@ -2135,17 +2135,6 @@
       case QEvent::DragLeave:
       case QEvent::Drop:
         return false;
-      case QEvent::Paint: {
-          QRect r = static_cast<QPaintEvent*>(e)->rect();
-          r = r.intersect( widget()->rect() );
-          if (r.isValid() && !r.isEmpty()) {
-              r.setX(r.x() +contentsX());
-              r.setY(r.y() +contentsY());
-              QPaintEvent pe(r);
-              paintEvent(&pe);
-          }
-          return true;
-      }
       default:
         break;
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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