File 3_5_BRANCH-r597380.diff of Package kdelibs3
------------------------------------------------------------------------
r597380 | dfaure | 2006-10-20 09:27:22 +0200 (Fri, 20 Oct 2006) | 5 lines
Insert icon into cache also when using the fallback to User icon - as discussed in the followups to commit r588915.
What remains to be decided is: forwardport this to trunk, or remove the fallback altogether?
I have no idea how many apps use the fallback, so I'd personally choose the former... but the latter would give a bit of a speedup.
CCMAIL: Antonio Larrosa <larrosa@kde.org>
------------------------------------------------------------------------
Index: kdecore/kiconloader.cpp
===================================================================
--- kdecore/kiconloader.cpp (revision 597379)
+++ kdecore/kiconloader.cpp (revision 597380)
@@ -728,8 +728,10 @@ QPixmap KIconLoader::loadIcon(const QStr
// Try "User" icon too. Some apps expect this.
if (!name.isEmpty())
pix = loadIcon(name, KIcon::User, size, state, path_store, true);
- if (!pix.isNull() || canReturnNull)
+ if (!pix.isNull() || canReturnNull) {
+ QPixmapCache::insert(key, pix);
return pix;
+ }
icon = findMatchingIcon(str_unknown, size);
if (!icon.isValid())