mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
QIconLoaderEngineEntry and QIconLoader friendship has been broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c058f1662c
commit
84633b3544
2 changed files with 23 additions and 19 deletions
|
@ -208,13 +208,16 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
|
|||
if (entries.isEmpty()) {
|
||||
// Search recursively through inherited themes
|
||||
foreach (const QString &parentTheme, theme.parents()) {
|
||||
if (!visited.contains(parentTheme)) // guard against recursion
|
||||
if (!visited.contains(parentTheme)) { // guard against recursion
|
||||
entries = findIconHelper(parentTheme, iconName, visited);
|
||||
}
|
||||
|
||||
if (!entries.isEmpty()) // success
|
||||
if (!entries.isEmpty()) {
|
||||
// success
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
|
@ -230,9 +233,7 @@ QThemeIconEntries QIconLoader::loadIcon(const QString &name) const
|
|||
|
||||
|
||||
// -------- Icon Loader Engine -------- //
|
||||
|
||||
|
||||
QIconLoaderEngine::QIconLoaderEngine(const QString& iconName)
|
||||
QIconLoaderEngine::QIconLoaderEngine(const QString &iconName)
|
||||
: m_iconName(iconName), m_key(0)
|
||||
{
|
||||
ensureLoaded();
|
||||
|
|
|
@ -46,14 +46,19 @@ class QIconLoader;
|
|||
|
||||
struct QIconDirInfo
|
||||
{
|
||||
enum Type { Fixed, Scalable, Threshold };
|
||||
QIconDirInfo(const QString &_path = QString()) :
|
||||
path(_path),
|
||||
enum Type {
|
||||
Fixed,
|
||||
Scalable,
|
||||
Threshold
|
||||
};
|
||||
|
||||
QIconDirInfo(const QString &_path = QString())
|
||||
: path(_path),
|
||||
size(0),
|
||||
maxSize(0),
|
||||
minSize(0),
|
||||
threshold(0),
|
||||
type(Threshold) {}
|
||||
type(Threshold) { }
|
||||
QString path;
|
||||
short size;
|
||||
short maxSize;
|
||||
|
@ -63,7 +68,7 @@ struct QIconDirInfo
|
|||
};
|
||||
|
||||
class QIconLoaderEngineEntry
|
||||
{
|
||||
{
|
||||
public:
|
||||
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
|
||||
|
||||
|
@ -97,8 +102,6 @@ private:
|
|||
QThemeIconEntries m_entries;
|
||||
QString m_iconName;
|
||||
uint m_key;
|
||||
|
||||
friend class QIconLoader;
|
||||
};
|
||||
|
||||
class QIconTheme
|
||||
|
|
Loading…
Add table
Reference in a new issue