Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QIconLoader Class Reference

#include <qiconloader_p.h>

+ Collaboration diagram for QIconLoader:

Public Member Functions

 QIconLoader ()
 
QThemeIconInfo loadIcon (const QString &iconName) const
 
uint themeKey () const
 
QString themeName () const
 
void setThemeName (const QString &themeName)
 
QString fallbackThemeName () const
 
void setFallbackThemeName (const QString &themeName)
 
QIconTheme theme ()
 
void setThemeSearchPath (const QStringList &searchPaths)
 
QStringList themeSearchPaths () const
 
void setFallbackSearchPaths (const QStringList &searchPaths)
 
QStringList fallbackSearchPaths () const
 
QIconDirInfo dirInfo (int dirindex)
 
void updateSystemTheme ()
 
void invalidateKey ()
 
void ensureInitialized ()
 
bool hasUserTheme () const
 
QIconEngineiconEngine (const QString &iconName) const
 

Static Public Member Functions

static QIconLoaderinstance ()
 

Detailed Description

Definition at line 161 of file qiconloader_p.h.

Constructor & Destructor Documentation

◆ QIconLoader()

QIconLoader::QIconLoader ( )

Definition at line 44 of file qiconloader.cpp.

Member Function Documentation

◆ dirInfo()

QIconDirInfo QIconLoader::dirInfo ( int  dirindex)

◆ ensureInitialized()

void QIconLoader::ensureInitialized ( )

Definition at line 84 of file qiconloader.cpp.

References QString::isEmpty(), keyMap, QGuiApplicationPrivate::platformTheme(), qCDebug, qt_iconEngineFactoryLoader(), systemFallbackThemeName(), and systemThemeName().

Referenced by instance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fallbackSearchPaths()

QStringList QIconLoader::fallbackSearchPaths ( ) const

Definition at line 195 of file qiconloader.cpp.

References systemFallbackSearchPaths().

Referenced by QIcon::fallbackSearchPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fallbackThemeName()

QString QIconLoader::fallbackThemeName ( ) const

Definition at line 158 of file qiconloader.cpp.

References QString::isEmpty(), and systemFallbackThemeName().

Referenced by QIcon::fallbackThemeName(), loadIcon(), and QIconTheme::parents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasUserTheme()

bool QIconLoader::hasUserTheme ( ) const
inline

Definition at line 182 of file qiconloader_p.h.

Referenced by iconEngine(), and updateSystemTheme().

+ Here is the caller graph for this function:

◆ iconEngine()

QIconEngine * QIconLoader::iconEngine ( const QString iconName) const

Definition at line 618 of file qiconloader.cpp.

References hasUserTheme(), iconEngine(), QGuiApplicationPrivate::platformTheme(), and qCDebug.

Referenced by iconEngine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instance()

QIconLoader * QIconLoader::instance ( )
static

Gets an instance.

\l QIcon::setFallbackThemeName() should be called before QGuiApplication is created, to avoid a race condition (QTBUG-74252). When this function is called from there, ensureInitialized() does not succeed because there is no QPlatformTheme yet, so systemThemeName() is empty, and we don't want m_systemTheme to get initialized to the fallback theme instead of the normal one.

Definition at line 112 of file qiconloader.cpp.

References ensureInitialized().

Referenced by QIcon::fallbackSearchPaths(), QIcon::fallbackThemeName(), QGuiApplicationPrivate::handleThemeChanged(), QIconTheme::parents(), QThemeIconEngine::proxiedEngine(), QIcon::setFallbackSearchPaths(), QIcon::setFallbackThemeName(), QQuickIconImage::setName(), QIcon::setThemeName(), QIcon::setThemeSearchPaths(), QIcon::themeName(), and QIcon::themeSearchPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidateKey()

void QIconLoader::invalidateKey ( )

Definition at line 134 of file qiconloader.cpp.

Referenced by setFallbackSearchPaths(), setFallbackThemeName(), setThemeName(), setThemeSearchPath(), and updateSystemTheme().

+ Here is the caller graph for this function:

◆ loadIcon()

QThemeIconInfo QIconLoader::loadIcon ( const QString iconName) const

Definition at line 579 of file qiconloader.cpp.

References QThemeIconInfo::entries, fallbackThemeName(), qCDebug, and themeName().

Referenced by QQuickIconImage::setName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFallbackSearchPaths()

void QIconLoader::setFallbackSearchPaths ( const QStringList searchPaths)

Definition at line 188 of file qiconloader.cpp.

References invalidateKey(), and qCDebug.

Referenced by QIcon::setFallbackSearchPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFallbackThemeName()

void QIconLoader::setFallbackThemeName ( const QString themeName)

Definition at line 163 of file qiconloader.cpp.

References invalidateKey(), qCDebug, and themeName().

Referenced by QIcon::setFallbackThemeName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setThemeName()

void QIconLoader::setThemeName ( const QString themeName)

Definition at line 147 of file qiconloader.cpp.

References invalidateKey(), qCDebug, and themeName().

Referenced by QIcon::setThemeName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setThemeSearchPath()

void QIconLoader::setThemeSearchPath ( const QStringList searchPaths)

Definition at line 170 of file qiconloader.cpp.

References QHash< Key, T >::clear(), invalidateKey(), and qCDebug.

Referenced by QIcon::setThemeSearchPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ theme()

QIconTheme QIconLoader::theme ( )
inline

Definition at line 172 of file qiconloader_p.h.

References themeName().

+ Here is the call graph for this function:

◆ themeKey()

uint QIconLoader::themeKey ( ) const
inline

Definition at line 166 of file qiconloader_p.h.

◆ themeName()

QString QIconLoader::themeName ( ) const

Definition at line 142 of file qiconloader.cpp.

References QString::isEmpty().

Referenced by loadIcon(), setFallbackThemeName(), setThemeName(), and QIcon::themeName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ themeSearchPaths()

QStringList QIconLoader::themeSearchPaths ( ) const

Definition at line 178 of file qiconloader.cpp.

References systemIconSearchPaths().

Referenced by QIcon::themeSearchPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSystemTheme()

void QIconLoader::updateSystemTheme ( )

Definition at line 120 of file qiconloader.cpp.

References hasUserTheme(), invalidateKey(), QString::isEmpty(), qCDebug, systemFallbackThemeName(), and systemThemeName().

Referenced by QGuiApplicationPrivate::handleThemeChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: