MessageViewer::IconNameCache

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-2020 The KDE developers.
Generated on Sat Sep 19 2020 23:12:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.