diff --git a/package.h b/package.h index 1f25367b3..25f617f2d 100644 --- a/package.h +++ b/package.h @@ -138,9 +138,6 @@ class PLASMA_EXPORT Package */ static bool registerPackage(const PackageMetadata &data, const QString &iconPath); - //TODO implement uninstall - //static bool uninstallPackage(const QString& package, const QString& packageRoot); - /** * Creates a package based on the metadata from the files contained * in the source directory diff --git a/packagestructure.cpp b/packagestructure.cpp index 8fb820854..ccbe22d97 100644 --- a/packagestructure.cpp +++ b/packagestructure.cpp @@ -365,6 +365,12 @@ bool PackageStructure::installPackage(const QString &package, const QString &pac return Package::installPackage(package, packageRoot); } +bool PackageStructure::uninstallPackage(const QString &package, const QString &packageRoot) +{ + //TODO: implement + return false; +} + } // Plasma namespace #include "packagestructure.moc" diff --git a/packagestructure.h b/packagestructure.h index 7cd199c89..cb085c0a9 100644 --- a/packagestructure.h +++ b/packagestructure.h @@ -214,8 +214,8 @@ public: void write(KConfigBase *config) const; /** - * Installs a package matching this package structure. By default simply calls - * Plasma::Package::install. + * Installs a package matching this package structure. By default installs a + * native Plasma::Package. * * @param archivePath path to the package archive file * @param packageRoot path to the directory where the package should be @@ -224,6 +224,15 @@ public: **/ virtual bool installPackage(const QString &archivePath, const QString &packageRoot); + /** + * Uninstalls a package matching this package structure. + * + * @arg package the name of the package to remove + * @arg packageRoot path to the directory where the package should be installed to + * @return true on successful removal of the package, false otherwise + */ + virtual bool uninstallPackage(const QString& package, const QString& packageRoot); + /** * @return the prefix inserted between the base path and content entries */