MessageViewer::IconNameCache

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.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Nov 28 2023 04:03:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.