diff --git a/package.cpp b/package.cpp index 894c843af..ff1b29fcc 100644 --- a/package.cpp +++ b/package.cpp @@ -467,37 +467,6 @@ QStringList Package::listInstalledPaths(const QString &packageRoot) // static return packages; } -bool Package::createPackage(const PackageMetadata &metadata, - const QString &source, - const QString &destination, - const QString &icon) // static -{ - Q_UNUSED(icon) - if (!metadata.isValid()) { - kWarning() << "Metadata file is not complete"; - return false; - } - - // write metadata in a temporary file - KTemporaryFile metadataFile; - if (!metadataFile.open()) { - return false; - } - metadata.write(metadataFile.fileName()); - - // put everything into a zip archive - KZip creation(destination); - creation.setCompression(KZip::NoCompression); - if (!creation.open(QIODevice::WriteOnly)) { - return false; - } - - creation.addLocalFile(metadataFile.fileName(), "metadata.desktop"); - creation.addLocalDirectory(source, "contents"); - creation.close(); - return true; -} - PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &p) : structure(st), service(0) diff --git a/package.h b/package.h index 2c45f0527..b610ff7c0 100644 --- a/package.h +++ b/package.h @@ -177,21 +177,6 @@ class PLASMA_EXPORT Package **/ static QStringList listInstalledPaths(const QString &packageRoot); - /** - * Creates a package based on the metadata from the files contained - * in the source directory - * - * @arg metadata description of the package to create - * @arg source path to local directory containing the individual - * files to be added to the package - * @arg destination path to the package that should be created - * @arg icon path to the package icon - **/ - static bool createPackage(const PackageMetadata &metadata, - const QString &source, - const QString &destination, - const QString &icon = QString()); - private: PackagePrivate * const d;