qppmhandler: avoid implicit detach
by const method usage Change-Id: If8e4d0c543837917d29361a116b955890b8a279f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
ea6c037435
commit
b2dd879f0a
@ -341,7 +341,7 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
|
|||||||
qsizetype bpl = qsizetype(w) * (gray ? 1 : 3);
|
qsizetype bpl = qsizetype(w) * (gray ? 1 : 3);
|
||||||
uchar *buf = new uchar[bpl];
|
uchar *buf = new uchar[bpl];
|
||||||
if (image.format() == QImage::Format_Indexed8) {
|
if (image.format() == QImage::Format_Indexed8) {
|
||||||
QList<QRgb> color = image.colorTable();
|
const QList<QRgb> color = image.colorTable();
|
||||||
for (uint y=0; y<h; y++) {
|
for (uint y=0; y<h; y++) {
|
||||||
const uchar *b = image.constScanLine(y);
|
const uchar *b = image.constScanLine(y);
|
||||||
uchar *p = buf;
|
uchar *p = buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user