summaryrefslogtreecommitdiffstats
path: root/src/widgets/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/effects')
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp
index 8956794e06..b21726400f 100644
--- a/src/widgets/effects/qpixmapfilter.cpp
+++ b/src/widgets/effects/qpixmapfilter.cpp
@@ -329,7 +329,7 @@ static void convolute(
QRectF sbounded = srect.adjusted(-kernelWidth / 2, -kernelHeight / 2, (kernelWidth - 1) / 2, (kernelHeight - 1) / 2);
QPoint srcStartPoint = sbounded.toAlignedRect().topLeft()+(targetRect.topLeft()-rect.topLeft());
- const uint *sourceStart = (uint*)processImage.scanLine(0);
+ const uint *sourceStart = (const uint*)processImage.scanLine(0);
uint *outputStart = (uint*)destImage->scanLine(0);
int yk = srcStartPoint.y();
@@ -946,7 +946,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
destRect.moveTo(QPoint(0, 0));
}
- unsigned int *data = (unsigned int *)image.bits();
+ const unsigned int *data = (const unsigned int *)image.bits();
unsigned int *outData = (unsigned int *)dest.bits();
if (dest.size() == image.size() && image.rect() == srcRect) {
@@ -959,7 +959,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
} else {
int yd = destRect.top();
for (int y = srcRect.top(); y <= srcRect.bottom() && y < image.height(); y++) {
- data = (unsigned int*)image.scanLine(y);
+ data = (const unsigned int*)image.scanLine(y);
outData = (unsigned int*)dest.scanLine(yd++);
int xd = destRect.left();
for (int x = srcRect.left(); x <= srcRect.right() && x < image.width(); x++) {