summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-11-05 15:55:36 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-11-06 09:04:18 (GMT)
commit64d38ba23b4acc46fdb9145f1953315573e3f8dc (patch)
treef8eaba3593f760100a02f9ff4af4975c0fa60aa9 /src/gui/kernel
parent13cd3c7a8975fc6dc72719b5a78d55159ab777a3 (diff)
downloadQt-64d38ba23b4acc46fdb9145f1953315573e3f8dc.zip
Qt-64d38ba23b4acc46fdb9145f1953315573e3f8dc.tar.gz
Qt-64d38ba23b4acc46fdb9145f1953315573e3f8dc.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/gui/kernel')
-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);