From kde-commits Fri Dec 31 21:09:34 2010 From: Pino Toscano Date: Fri, 31 Dec 2010 21:09:34 +0000 To: kde-commits Subject: extragear/utils/kpager Message-Id: <20101231210934.0F09DAC8AE () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129382980311757 SVN commit 1210512 by pino: get rid of the custom pixmap to avoid flickering on paint this was a qt3 hack, qt4 does that natively (and better) M +2 -8 desktop.cpp --- trunk/extragear/utils/kpager/desktop.cpp #1210511:1210512 @@ -398,10 +398,9 @@ void Desktop::paintEvent( QPaintEvent * ) { - QPixmap pixmap(width(),height()); QPainter p; - p.begin(&pixmap); + p.begin(this); // p.setFont(font()); // p.fillRect(rect(), colorGroup().brush(QPalette::Dark)); // p.setPen(Qt::black); @@ -425,7 +424,7 @@ p.drawPixmap(0,0,tmp); } - else pixmap.fill(Qt::gray); + else p.fillRect(rect(), Qt::gray); } else p.fillRect(rect(), palette().brush(QPalette::Mid)); @@ -475,11 +474,6 @@ p.drawRect(rect()); p.end(); - // blit pixmap to widget - p.begin(this); - p.drawPixmap(0,0,pixmap); - p.end(); - m_grabWindows=false; }