kdelibs/kdelibs-4.4.0-khtml_scrolli...

33 lines
1.1 KiB
Diff

SVN commit 1089160 by ggarand:
automatically merged revision 1089159:
Critical performance fix:
There is a huge difference of behaviour between DEBUG and RELEASE
builds of Qt 4.6, that breaks scrolling in KHTML.
Using QWidget::scroll() on a widget that doesn't have WA_OpaquePaintEvent
attribute set works just fine in Debug, but completely breaks down in
Release, causing the whole view to get repainted always.
CCMAIL: kde-packager@kde.org
M +6 -0 khtmlview.cpp
--- branches/KDE/4.4/kdelibs/khtml/khtmlview.cpp #1089159:1089160
@@ -604,6 +604,12 @@
setWidget( new QWidget(this) );
widget()->setAttribute( Qt::WA_NoSystemBackground );
+ // Do *not* remove this attribute frivolously.
+ // You might not notice a change of behaviour in Debug builds
+ // but removing opaque events will make QWidget::scroll fail horribly
+ // in Release builds.
+ widget()->setAttribute( Qt::WA_OpaquePaintEvent );
+
verticalScrollBar()->setCursor( Qt::ArrowCursor );
horizontalScrollBar()->setCursor( Qt::ArrowCursor );