support the standard package types
svn path=/trunk/KDE/kdelibs/; revision=922898
This commit is contained in:
parent
3c31418f84
commit
b59302b92f
@ -33,6 +33,8 @@
|
||||
#include <kio/job.h>
|
||||
|
||||
#include "package.h"
|
||||
#include "private/packages_p.h"
|
||||
#include "theme.h"
|
||||
|
||||
namespace Plasma
|
||||
{
|
||||
@ -120,6 +122,21 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat)
|
||||
return structure;
|
||||
}
|
||||
|
||||
if (packageFormat == "plasmoid") {
|
||||
structure = defaultPackageStructure(AppletComponent);
|
||||
} else if (packageFormat == "dataengine") {
|
||||
structure = defaultPackageStructure(DataEngineComponent);
|
||||
} else if (packageFormat == "runner") {
|
||||
structure = defaultPackageStructure(RunnerComponent);
|
||||
} else if (packageFormat == "theme") {
|
||||
structure = Theme::packageStructure();
|
||||
}
|
||||
|
||||
if (structure) {
|
||||
PackageStructurePrivate::structures[packageFormat] = structure;
|
||||
return structure;
|
||||
}
|
||||
|
||||
// first we check for plugins in sycoca
|
||||
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(packageFormat);
|
||||
KService::List offers =
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define LIBS_PLASMA_PACKAGES_P_H
|
||||
|
||||
#include <plasma/packagestructure.h>
|
||||
#include "plasma.h"
|
||||
|
||||
namespace Plasma
|
||||
{
|
||||
@ -43,6 +44,8 @@ public:
|
||||
explicit ThemePackage(QObject *parent = 0);
|
||||
};
|
||||
|
||||
PackageStructure::Ptr defaultPackageStructure(ComponentType type);
|
||||
|
||||
} // namespace Plasma
|
||||
|
||||
#endif // LIBS_PLASMA_PACKAGES_P_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user