diff options
author | Janne Koskinen <janne.p.koskinen@digia.com> | 2009-05-11 12:16:25 (GMT) |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@digia.com> | 2009-05-11 12:16:25 (GMT) |
commit | f005af3b8c8405219b39bacd348d3861f1243aa8 (patch) | |
tree | a2d1f332de493d3d2cf0e0d1b3ad7c062176fe39 /src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp | |
parent | 8aaa0cbf3451dee7bc8e8276faad3b2f2954dc1c (diff) | |
parent | 565f2957fb049f2df0330fac72ec5335860b9c7f (diff) | |
download | Qt-f005af3b8c8405219b39bacd348d3861f1243aa8.zip Qt-f005af3b8c8405219b39bacd348d3861f1243aa8.tar.gz Qt-f005af3b8c8405219b39bacd348d3861f1243aa8.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts:
src/gui/widgets/qmenu_symbian.cpp
Diffstat (limited to 'src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp')
-rw-r--r-- | src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp index 7fdf81f..c7249d3 100644 --- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp +++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp @@ -121,7 +121,7 @@ QSize QSvgIconEngine::actualSize(const QSize &size, QIcon::Mode mode, if (!pm.isNull() && pm.size() == size) return size; } - + QSvgRenderer renderer; d->loadDataForModeAndState(&renderer, mode, state); if (renderer.isValid()) { @@ -158,9 +158,13 @@ void QSvgIconEnginePrivate::loadDataForModeAndState(QSvgRenderer *renderer, QIco QPixmap QSvgIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) -{ +{ QPixmap pm; + QString pmckey(d->pmcKey(size, mode, state)); + if (QPixmapCache::find(pmckey, pm)) + return pm; + if (d->addedPixmaps) { pm = d->addedPixmaps->value(d->hashKey(mode, state)); if (!pm.isNull() && pm.size() == size) @@ -176,10 +180,6 @@ QPixmap QSvgIconEngine::pixmap(const QSize &size, QIcon::Mode mode, if (!actualSize.isNull()) actualSize.scale(size, Qt::KeepAspectRatio); - QString pmckey(d->pmcKey(actualSize, mode, state)); - if (QPixmapCache::find(pmckey, pm)) - return pm; - QImage img(actualSize, QImage::Format_ARGB32_Premultiplied); img.fill(0x00000000); QPainter p(&img); |