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
QIconCacheGtkReader Class Reference
+ Collaboration diagram for QIconCacheGtkReader:

Public Member Functions

 QIconCacheGtkReader (const QString &themeDir)
 
QList< const char * > lookup (QStringView)
 
bool isValid () const
 

Detailed Description

Helper class that reads and looks up into the icon-theme.cache generated with gtk-update-icon-cache. If at any point we detect a corruption in the file (because the offsets point at wrong locations for example), the reader is marked as invalid.

Definition at line 216 of file qiconloader.cpp.

Constructor & Destructor Documentation

◆ QIconCacheGtkReader()

QIconCacheGtkReader::QIconCacheGtkReader ( const QString & themeDir)
explicit

Definition at line 248 of file qiconloader.cpp.

References QString::fromUtf8(), i, info, m_data, QFileDevice::map(), QFile::open(), QIODeviceBase::ReadOnly, QFile::setFileName(), QFile::size(), and QTimeZone::UTC.

+ Here is the call graph for this function:

Member Function Documentation

◆ isValid()

bool QIconCacheGtkReader::isValid ( ) const
inline

Definition at line 221 of file qiconloader.cpp.

Referenced by lookup().

+ Here is the caller graph for this function:

◆ lookup()

QList< const char * > QIconCacheGtkReader::lookup ( QStringView name)

lookup the icon name and return the list of subdirectories in which an icon with this name is present. The char* are pointers to the mapped data. For example, this would return { "32x32/apps", "24x24/apps" , ... }

Definition at line 293 of file qiconloader.cpp.

References hash, icon_name_hash(), isValid(), j, m_data, o, and ret.

+ Here is the call graph for this function:

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