summaryrefslogtreecommitdiff
path: root/src/gui/image/qpixmap_qws.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_qws.cpp')
-rw-r--r--src/gui/image/qpixmap_qws.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp
index a8516a5147..69626edb83 100644
--- a/src/gui/image/qpixmap_qws.cpp
+++ b/src/gui/image/qpixmap_qws.cpp
@@ -124,9 +124,14 @@ QRgb* QPixmap::clut() const
int QPixmap::numCols() const
{
+ return colorCount();
+}
+
+int QPixmap::colorCount() const
+{
if (data && data->classId() == QPixmapData::RasterClass) {
const QRasterPixmapData *d = static_cast<const QRasterPixmapData*>(data.data());
- return d->image.numColors();
+ return d->image.colorCount();
}
return 0;