diff --git a/qt/pool.cpp b/qt/pool.cpp index 17563b4e..5ada19c8 100644 --- a/qt/pool.cpp +++ b/qt/pool.cpp @@ -183,3 +183,13 @@ void Pool::setCacheFlags(uint flags) { as_pool_set_cache_flags (d->pool, (AsCacheFlags) flags); } + +QString AppStream::Pool::cacheLocation() const +{ + return QString::fromUtf8(as_pool_get_cache_location(d->pool)); +} + +void Pool::setCacheLocation(const QString &location) +{ + as_pool_set_cache_location(d->pool, qPrintable(location)); +} diff --git a/qt/pool.h b/qt/pool.h index 437d84f4..001e07f2 100644 --- a/qt/pool.h +++ b/qt/pool.h @@ -126,6 +126,9 @@ Q_OBJECT uint cacheFlags() const; void setCacheFlags(uint flags); + void setCacheLocation(const QString &path); + QString cacheLocation() const; + private: Q_DISABLE_COPY(Pool); QScopedPointer d;