summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qxpmhandler.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-04-14 14:55:44 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-06-01 09:35:29 +0000
commita24b90a21c4f2feb61630ca6a1684312556a6bc7 (patch)
tree1717ed9f699dd5cb119471ccb51f661b7d207f8b /src/gui/image/qxpmhandler.cpp
parentd11abc8bd7ac10da4bfd548b3d1d9d4e0dd6a264 (diff)
Gui: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I88d08d499e1be72c1f6d983fecdcee513df18aa2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/image/qxpmhandler.cpp')
-rw-r--r--src/gui/image/qxpmhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index 5ae8e893cb..c8dd589673 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1154,7 +1154,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
int cc = 0;
for(x=0; x<w; x++) {
int color = (int)(*(yp + x));
- QByteArray chars(xpm_color_name(cpp, colorMap[color]));
+ const QByteArray chars(xpm_color_name(cpp, colorMap[color]));
line[cc++] = QLatin1Char(chars[0]);
if (cpp > 1) {
line[cc++] = QLatin1Char(chars[1]);