summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kudryavtsev <[email protected]>2023-09-15 14:38:20 +0300
committerAnton Kudryavtsev <[email protected]>2023-09-25 17:17:57 +0300
commitb2dd879f0a919654bb466a5fc9cd021931cd880c (patch)
tree52463a5babf3dd1c57b707a600b9db038fe17cf8
parentea6c0374359415f3dd4331fab3e5e5245d9cae84 (diff)
qppmhandler: avoid implicit detach
by const method usage Change-Id: If8e4d0c543837917d29361a116b955890b8a279f Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: MÃ¥rten Nordheim <[email protected]>
-rw-r--r--src/gui/image/qppmhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index e53db69e665..a4689a99f3d 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -341,7 +341,7 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
qsizetype bpl = qsizetype(w) * (gray ? 1 : 3);
uchar *buf = new uchar[bpl];
if (image.format() == QImage::Format_Indexed8) {
- QList<QRgb> color = image.colorTable();
+ const QList<QRgb> color = image.colorTable();
for (uint y=0; y<h; y++) {
const uchar *b = image.constScanLine(y);
uchar *p = buf;