diff --git a/package.cpp b/package.cpp index 9635d47ec..98e1c9c22 100644 --- a/package.cpp +++ b/package.cpp @@ -160,6 +160,12 @@ PackageMetadata Package::metadata() const return d->structure->metadata(); } +void Package::setPath(const QString &path) +{ + d->structure->setPath(path); + d->valid = !d->structure->path().isEmpty(); +} + const QString Package::path() const { return d->structure->path(); diff --git a/package.h b/package.h index 7459396af..78d2c65e8 100644 --- a/package.h +++ b/package.h @@ -97,10 +97,17 @@ class PLASMA_EXPORT Package QStringList entryList(const char *fileType) const; /** - * @return the package metadata object. - */ + * @return the package metadata object. + */ PackageMetadata metadata() const; + /** + * Sets the path to the root of this package + * @arg path and absolute path + * @since 4.3 + */ + void setPath(const QString &path); + /** * @return the path to the root of this particular package */