summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-10-05 12:21:18 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-10-05 12:23:21 +0200
commitc1d24c6b87dcc4c6e2f6f258c0198fdb6b2795f0 (patch)
tree0e6842a6132a154c2124482a8464b74c428b3a1c /src/gui/image/qpixmap_x11.cpp
parent5286a0211d9c76bf762c8041c1d596d8c9c9c08d (diff)
Made X11 QPixmap backend return proper pixmap in alphaChannel().
Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 6cde898737..92a7e7d67c 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1252,8 +1252,11 @@ void QX11PixmapData::release()
QPixmap QX11PixmapData::alphaChannel() const
{
- if (!hasAlphaChannel())
- return QPixmap();
+ if (!hasAlphaChannel()) {
+ QPixmap pm(w, h);
+ pm.fill(Qt::white);
+ return pm;
+ }
QImage im(toImage());
return QPixmap::fromImage(im.alphaChannel(), Qt::OrderedDither);
}