summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qxpmhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qxpmhandler.cpp')
-rw-r--r--src/gui/image/qxpmhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index e9ac4a9cc2..fbce78eb74 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1098,7 +1098,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
// build color table
for(y=0; y<h; y++) {
- QRgb * yp = (QRgb *)image.scanLine(y);
+ const QRgb *yp = reinterpret_cast<const QRgb *>(image.constScanLine(y));
for(x=0; x<w; x++) {
QRgb color = *(yp + x);
if (!colorMap.contains(color))
@@ -1144,7 +1144,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
// write pixels, limit to 4 characters per pixel
line.truncate(cpp*w);
for(y=0; y<h; y++) {
- QRgb * yp = (QRgb *) image.scanLine(y);
+ const QRgb *yp = reinterpret_cast<const QRgb *>(image.constScanLine(y));
int cc = 0;
for(x=0; x<w; x++) {
int color = (int)(*(yp + x));