- Extending Qt Creator Manual
- QtCreator
- QrcCache
- Extending Qt Creator Manual 20.0.2

# Utils::QrcCache Class

class Utils::QrcCache

The QrcCache class caches the contents of parsed QRC files. More...

Header: | `#include <QrcCache>`

- List of all members, including inherited members

## Public Functions

Utils::QrcParser::ConstPtr | addPath(const Utils::FilePath &path, const QString &contents)
void | clear()
Utils::QrcParser::ConstPtr | parsedPath(const Utils::FilePath &path)
void | removePath(const Utils::FilePath &path)
Utils::QrcParser::ConstPtr | updatePath(const Utils::FilePath &path, const QString &contents)

## Detailed Description

See also Utils::QrcParser.

## Member Function Documentation

### Utils::QrcParser::ConstPtr QrcCache::addPath(const Utils::FilePath &path, const QString &contents)

Parses the QRC file at path and caches the parser. If contents is not empty, it is used as the file contents instead of reading it from the file system.

Returns whether the parsing succeeded.

See also QrcParser::errorMessages() and QrcParser::parseQrcFile().

### void QrcCache::clear()

Clears the contents of the cache.

### Utils::QrcParser::ConstPtr QrcCache::parsedPath(const Utils::FilePath &path)

Returns the cached QRC parser for the QRC file at path.

### void QrcCache::removePath(const Utils::FilePath &path)

Removes path from the cache.

### Utils::QrcParser::ConstPtr QrcCache::updatePath(const Utils::FilePath &path, const QString &contents)

Reparses the QRC file at path and returns the contents of the file.