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>.
|
#include <qiconloader_p.h>
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 |
QIconEngine * | iconEngine (const QString &iconName) const |
Static Public Member Functions | |
static QIconLoader * | instance () |
Definition at line 164 of file qiconloader_p.h.
QIconLoader::QIconLoader | ( | ) |
Definition at line 44 of file qiconloader.cpp.
QIconDirInfo QIconLoader::dirInfo | ( | int | dirindex | ) |
void QIconLoader::ensureInitialized | ( | ) |
Definition at line 84 of file qiconloader.cpp.
References QString::isEmpty(), keyMap, QGuiApplicationPrivate::platformTheme(), qCDebug, qt_iconEngineFactoryLoader(), systemFallbackThemeName(), and systemThemeName().
QStringList QIconLoader::fallbackSearchPaths | ( | ) | const |
Definition at line 201 of file qiconloader.cpp.
References systemFallbackSearchPaths().
QString QIconLoader::fallbackThemeName | ( | ) | const |
Definition at line 164 of file qiconloader.cpp.
References QString::isEmpty(), and systemFallbackThemeName().
Referenced by loadIcon().
|
inline |
Definition at line 185 of file qiconloader_p.h.
Referenced by iconEngine(), setThemeName(), and updateSystemTheme().
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().
|
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().
void QIconLoader::invalidateKey | ( | ) |
Definition at line 134 of file qiconloader.cpp.
Referenced by setFallbackSearchPaths(), setFallbackThemeName(), setThemeName(), setThemeSearchPath(), and updateSystemTheme().
QThemeIconInfo QIconLoader::loadIcon | ( | const QString & | iconName | ) | const |
Definition at line 608 of file qiconloader.cpp.
References fallbackThemeName(), qCDebug, and themeName().
void QIconLoader::setFallbackSearchPaths | ( | const QStringList & | searchPaths | ) |
Definition at line 194 of file qiconloader.cpp.
References invalidateKey(), and qCDebug.
Definition at line 169 of file qiconloader.cpp.
References invalidateKey(), qCDebug, and themeName().
Definition at line 147 of file qiconloader.cpp.
References hasUserTheme(), invalidateKey(), qCDebug, setThemeSearchPath(), systemIconSearchPaths(), and themeName().
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().
|
inline |
Definition at line 175 of file qiconloader_p.h.
References themeName().
|
inline |
Definition at line 169 of file qiconloader_p.h.
QString QIconLoader::themeName | ( | ) | const |
Definition at line 142 of file qiconloader.cpp.
References QString::isEmpty().
Referenced by loadIcon(), setFallbackThemeName(), and setThemeName().
QStringList QIconLoader::themeSearchPaths | ( | ) | const |
Definition at line 184 of file qiconloader.cpp.
References systemIconSearchPaths().
void QIconLoader::updateSystemTheme | ( | ) |
Definition at line 120 of file qiconloader.cpp.
References hasUserTheme(), invalidateKey(), QString::isEmpty(), qCDebug, systemFallbackThemeName(), and systemThemeName().