mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-02 18:36:49 +01:00
Clearing icon cache.
This commit is contained in:
parent
4ffab88435
commit
bcb2421be1
@ -283,6 +283,9 @@ void FormMain::setupIcons() {
|
|||||||
|
|
||||||
// Setup icons on TabWidget too.
|
// Setup icons on TabWidget too.
|
||||||
m_ui->m_tabWidget->setupIcons();
|
m_ui->m_tabWidget->setupIcons();
|
||||||
|
|
||||||
|
// Most of icons are loaded, clear the cache.
|
||||||
|
qApp->icons()->clearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormMain::loadSize() {
|
void FormMain::loadSize() {
|
||||||
|
@ -57,6 +57,10 @@ QByteArray IconFactory::toByteArray(const QIcon &icon) {
|
|||||||
return array.toBase64();
|
return array.toBase64();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IconFactory::clearCache() {
|
||||||
|
m_cachedIcons.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void IconFactory::setupSearchPaths() {
|
void IconFactory::setupSearchPaths() {
|
||||||
QIcon::setThemeSearchPaths(QStringList() << APP_THEME_PATH);
|
QIcon::setThemeSearchPaths(QStringList() << APP_THEME_PATH);
|
||||||
qDebug("Available icon theme paths: %s.",
|
qDebug("Available icon theme paths: %s.",
|
||||||
|
@ -44,6 +44,8 @@ class IconFactory : public QObject {
|
|||||||
QIcon fromByteArray(QByteArray array);
|
QIcon fromByteArray(QByteArray array);
|
||||||
QByteArray toByteArray(const QIcon &icon);
|
QByteArray toByteArray(const QIcon &icon);
|
||||||
|
|
||||||
|
void clearCache();
|
||||||
|
|
||||||
// Returns icon from active theme or invalid icon if
|
// Returns icon from active theme or invalid icon if
|
||||||
// "no icon theme" is set.
|
// "no icon theme" is set.
|
||||||
inline QIcon fromTheme(const QString &name) {
|
inline QIcon fromTheme(const QString &name) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user