Fix warning "QPixmap::operator=: Cannot assign to pixmap during painting"

svn path=/trunk/KDE/kdebase/workspace/; revision=1132445
This commit is contained in:
Christoph Feck 2010-05-30 16:59:39 +00:00
parent f46e0634fb
commit 71959ec006

View file

@ -123,7 +123,6 @@ static inline const KDecorationOptions* options()
static void make_button_fx(const QPalette &g, QPixmap *pix, bool light=false) static void make_button_fx(const QPalette &g, QPixmap *pix, bool light=false)
{ {
pix->fill(g.background().color()); pix->fill(g.background().color());
QPainter p(pix);
if(QPixmap::defaultDepth() > 8){ if(QPixmap::defaultDepth() > 8){
int i, destH, destS, destV, srcH, srcS, srcV; int i, destH, destS, destV, srcH, srcS, srcV;
@ -150,6 +149,7 @@ static void make_button_fx(const QPalette &g, QPixmap *pix, bool light=false)
} }
else{ else{
QPainter p(pix);
if(!lcDark1.mask()){ if(!lcDark1.mask()){
lcDark1.setMask(lcDark1); lcDark1.setMask(lcDark1);
lcDark2.setMask(lcDark2); lcDark2.setMask(lcDark2);