diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-11-05 15:55:36 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-06 13:07:39 (GMT) |
commit | dd877a22f2d148a90e010dbac497426199ad6284 (patch) | |
tree | a279631d67b863264776b3e231cc8853ed3936a2 /src | |
parent | 13077781b0e54b53c5610638b1ab7abfc021f263 (diff) | |
download | Qt-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.cpp | 3 |
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); |