diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-05-28 13:07:01 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-05-28 13:11:25 (GMT) |
commit | 408ca46193f70ff66d060f7b7c506a97fee945e2 (patch) | |
tree | 09cc5fa79d63d6c34b569a63234066bc648e82e4 /src/gui | |
parent | 8e2d3cc2e84b6d8109c30a853ea40ff9cfa29bcc (diff) | |
download | Qt-408ca46193f70ff66d060f7b7c506a97fee945e2.zip Qt-408ca46193f70ff66d060f7b7c506a97fee945e2.tar.gz Qt-408ca46193f70ff66d060f7b7c506a97fee945e2.tar.bz2 |
Fixed a problem with streaming QIcons containing multiple pixmaps.
If pixmaps were added through QIcon::addFile() with different sizes
than the sizes of the pixmaps themselves, streaming the icon in didn't
work properly.
Task-number: 254374
Reviewed-by: Kim
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qicon.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index a880a13..0799ea7 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -428,10 +428,13 @@ bool QPixmapIconEngine::read(QDataStream &in) in >> sz; in >> mode; in >> state; - if (pm.isNull()) + if (pm.isNull()) { addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); - else - addPixmap(pm, QIcon::Mode(mode), QIcon::State(state)); + } else { + QPixmapIconEngineEntry pe(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); + pe.pixmap = pm; + pixmaps += pe; + } } return true; } |