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(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; }