From b2dd879f0a919654bb466a5fc9cd021931cd880c Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Fri, 15 Sep 2023 14:38:20 +0300 Subject: [PATCH] qppmhandler: avoid implicit detach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by const method usage Change-Id: If8e4d0c543837917d29361a116b955890b8a279f Reviewed-by: Edward Welbourne Reviewed-by: MÃ¥rten Nordheim --- src/gui/image/qppmhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp index e53db69e66..a4689a99f3 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 color = image.colorTable(); + const QList color = image.colorTable(); for (uint y=0; y