Search for usage in LXR

MessageViewer::IconNameCache Class Reference

#include <iconnamecache.h>

Public Member Functions

QString iconPath (const QString &name, int size) const
QString iconPathFromLocal (const QString &name) const

Static Public Member Functions

static IconNameCacheinstance ()

Detailed Description

This class is a replacement for KIconLoader::iconPath(), because the iconPath() function can be slow for non-existing icons or icons that fall back to a generic icon.

Reason is that KIconLoader does slow system calls for finding the icons.

The IconNameCache caches the result of iconPath() in a map and solves the slowness.

Definition at line 20 of file iconnamecache.h.

Member Function Documentation

◆ iconPath()

QString IconNameCache::iconPath ( const QString & name,
int size ) const

Definition at line 30 of file iconnamecache.cpp.

◆ iconPathFromLocal()

QString IconNameCache::iconPathFromLocal ( const QString & name) const

Definition at line 46 of file iconnamecache.cpp.

◆ instance()

IconNameCache * IconNameCache::instance ( )

Definition at line 15 of file iconnamecache.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:53:09 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.