summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/ico/qicohandler.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-02-01 06:34:29 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-02-01 06:56:50 (GMT)
commit394b7ae6421afb0e309b6207fa2b1fce2e44426e (patch)
tree1b978136d45f813288ede835fdcdeb008b34cadf /src/plugins/imageformats/ico/qicohandler.cpp
parentdc1cab966938edc5463f26189607ece134549a22 (diff)
parent26af4d54ea4f3a48d053038f34a00aa1119a585b (diff)
downloadQt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.zip
Qt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.tar.gz
Qt-394b7ae6421afb0e309b6207fa2b1fce2e44426e.tar.bz2
Merge commit 'origin/4.6' into oslo1-master
Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/plugins/imageformats/ico/qicohandler.cpp')
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index 4f49476..b2351fa 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -556,7 +556,11 @@ QImage ICOReader::iconAt(int index)
else // # colors used
icoAttrib.ncolors = header.biClrUsed ? header.biClrUsed : 1 << icoAttrib.nbits;
icoAttrib.w = iconEntry.bWidth;
+ if (icoAttrib.w == 0)
+ icoAttrib.w = header.biWidth;
icoAttrib.h = iconEntry.bHeight;
+ if (icoAttrib.h == 0)
+ icoAttrib.h = header.biHeight/2;
QImage::Format format = QImage::Format_ARGB32;
if (icoAttrib.nbits == 24)