kiconloader.cpp | kiconloader.cpp | |||
---|---|---|---|---|
skipping to change at line 453 | skipping to change at line 453 | |||
setObjectName(componentData.componentName()); | setObjectName(componentData.componentName()); | |||
d = new KIconLoaderPrivate(this); | d = new KIconLoaderPrivate(this); | |||
connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)), | connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)), | |||
this, SLOT(newIconLoader())); | this, SLOT(newIconLoader())); | |||
d->init(componentData.componentName(), componentData.dirs()); | d->init(componentData.componentName(), componentData.dirs()); | |||
} | } | |||
void KIconLoader::reconfigure( const QString& _appname, KStandardDirs *_dir s ) | void KIconLoader::reconfigure( const QString& _appname, KStandardDirs *_dir s ) | |||
{ | { | |||
d->mIconCache->clear(); | ||||
delete d; | delete d; | |||
d = new KIconLoaderPrivate(this); | d = new KIconLoaderPrivate(this); | |||
d->init( _appname, _dirs ); | d->init( _appname, _dirs ); | |||
} | } | |||
void KIconLoaderPrivate::init( const QString& _appname, KStandardDirs *_dir s ) | void KIconLoaderPrivate::init( const QString& _appname, KStandardDirs *_dir s ) | |||
{ | { | |||
extraDesktopIconsLoaded=false; | extraDesktopIconsLoaded=false; | |||
mIconThemeInited = false; | mIconThemeInited = false; | |||
mpThemeRoot = 0; | mpThemeRoot = 0; | |||
skipping to change at line 1220 | skipping to change at line 1221 | |||
// May modify group, size, or state. This function puts them into sane | // May modify group, size, or state. This function puts them into sane | |||
// states. | // states. | |||
d->normalizeIconMetadata(group, size, state); | d->normalizeIconMetadata(group, size, state); | |||
// See if the image is already cached. | // See if the image is already cached. | |||
QString key = d->makeCacheKey(name, group, overlays, size, state); | QString key = d->makeCacheKey(name, group, overlays, size, state); | |||
QPixmap pix; | QPixmap pix; | |||
bool iconWasUnknown = false; | bool iconWasUnknown = false; | |||
K3Icon icon; | K3Icon icon; | |||
if (d->findCachedPixmapWithPath(key, pix, icon.path)) { | // icon.path would be empty for "unknown" icons, which should be search | |||
ed for | ||||
// anew each time. | ||||
if (d->findCachedPixmapWithPath(key, pix, icon.path) && !icon.path.isEm | ||||
pty()) { | ||||
if (path_store) { | if (path_store) { | |||
*path_store = icon.path; | *path_store = icon.path; | |||
} | } | |||
// We cache the pixmap for the event of trying to find an unknown i | ||||
con | ||||
// with canReturnNull set to false, but if we *can* return null the | ||||
n | ||||
// we should do so when necessary. | ||||
if (canReturnNull && icon.path.isEmpty()) { | ||||
return QPixmap(); | ||||
} | ||||
return pix; | return pix; | |||
} | } | |||
// Image is not cached... go find it and apply effects. | // Image is not cached... go find it and apply effects. | |||
if (!d->initIconThemes()) { | if (!d->initIconThemes()) { | |||
return QPixmap(); | return QPixmap(); | |||
} | } | |||
favIconOverlay = favIconOverlay && size > 22; | favIconOverlay = favIconOverlay && size > 22; | |||
End of changes. 3 change blocks. | ||||
9 lines changed or deleted | 6 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |