From a5e27d022def188328dcc767e25485d37dcd6a9a Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 4 Sep 2023 14:54:43 +0300 Subject: [PATCH] qbmphandler: use const more to avoid implicit detach Change-Id: Ic07746b2715a2a804f20db772e63d3cb389ee581 Reviewed-by: Edward Welbourne --- src/gui/image/qbmphandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index b65ca923e58..798ba7f4b38 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -608,7 +608,7 @@ bool qt_write_dib(QDataStream &s, const QImage &image, int bpl, int bpl_bmp, int if (image.depth() != 32) { // write color table uchar *color_table = new uchar[4*image.colorCount()]; uchar *rgb = color_table; - QList c = image.colorTable(); + const QList c = image.colorTable(); for (int i = 0; i < image.colorCount(); i++) { *rgb++ = qBlue (c[i]); *rgb++ = qGreen(c[i]);