Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 164 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().

+ Here is the call graph for this function:

◆ fallbackSearchPaths()

QStringList QIconLoader::fallbackSearchPaths ( ) const

Definition at line 201 of file qiconloader.cpp.

References systemFallbackSearchPaths().

+ Here is the call graph for this function:

◆ fallbackThemeName()

QString QIconLoader::fallbackThemeName ( ) const

Definition at line 164 of file qiconloader.cpp.

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

Referenced by loadIcon().

+ 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 185 of file qiconloader_p.h.

Referenced by iconEngine(), setThemeName(), and updateSystemTheme().

+ Here is the caller graph for this function:

◆ iconEngine()

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

Definition at line 648 of file qiconloader.cpp.

References hasUserTheme(), iconEngine(), QIconEngine::isNull(), 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.

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

+ 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 608 of file qiconloader.cpp.

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

+ Here is the call graph for this function:

◆ setFallbackSearchPaths()

void QIconLoader::setFallbackSearchPaths ( const QStringList & searchPaths)

Definition at line 194 of file qiconloader.cpp.

References invalidateKey(), and qCDebug.

+ Here is the call graph for this function:

◆ setFallbackThemeName()

void QIconLoader::setFallbackThemeName ( const QString & themeName)

Definition at line 169 of file qiconloader.cpp.

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

+ Here is the call graph for this function:

◆ setThemeName()

void QIconLoader::setThemeName ( const QString & themeName)

Definition at line 147 of file qiconloader.cpp.

References hasUserTheme(), invalidateKey(), qCDebug, setThemeSearchPath(), systemIconSearchPaths(), and themeName().

+ Here is the call graph for this function:

◆ setThemeSearchPath()

void QIconLoader::setThemeSearchPath ( const QStringList & searchPaths)

Definition at line 176 of file qiconloader.cpp.

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

Referenced by setThemeName().

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

◆ theme()

QIconTheme QIconLoader::theme ( )
inline

Definition at line 175 of file qiconloader_p.h.

References themeName().

+ Here is the call graph for this function:

◆ themeKey()

uint QIconLoader::themeKey ( ) const
inline

Definition at line 169 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(), and setThemeName().

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

◆ themeSearchPaths()

QStringList QIconLoader::themeSearchPaths ( ) const

Definition at line 184 of file qiconloader.cpp.

References systemIconSearchPaths().

+ Here is the call 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().

+ Here is the call graph for this function:

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