summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-11-05 15:55:36 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-11-06 13:07:39 (GMT)
commitdd877a22f2d148a90e010dbac497426199ad6284 (patch)
treea279631d67b863264776b3e231cc8853ed3936a2 /src
parent13077781b0e54b53c5610638b1ab7abfc021f263 (diff)
downloadQt-dd877a22f2d148a90e010dbac497426199ad6284.zip
Qt-dd877a22f2d148a90e010dbac497426199ad6284.tar.gz
Qt-dd877a22f2d148a90e010dbac497426199ad6284.tar.bz2
Fixed uninitialized background artifacts in QWidget::render.
We need to use isOpaque to check whether the widget has an opaque background, it's not enough to just check the palette (it doesn't check Qt::NoSystemBackground for example). Task-number: QTBUG-5012 Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 386bf71..271b939 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5171,8 +5171,7 @@ void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset
return;
QPixmap pixmap(size);
- if (!(renderFlags & QWidget::DrawWindowBackground)
- || !q->palette().brush(q->backgroundRole()).isOpaque())
+ if (!(renderFlags & QWidget::DrawWindowBackground) || !isOpaque)
pixmap.fill(Qt::transparent);
q->render(&pixmap, QPoint(), toBePainted, renderFlags);