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 <kio/job.h>
|
||||||
|
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
|
#include "private/packages_p.h"
|
||||||
|
#include "theme.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
@ -120,6 +122,21 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat)
|
||||||
return structure;
|
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
|
// first we check for plugins in sycoca
|
||||||
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(packageFormat);
|
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(packageFormat);
|
||||||
KService::List offers =
|
KService::List offers =
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define LIBS_PLASMA_PACKAGES_P_H
|
#define LIBS_PLASMA_PACKAGES_P_H
|
||||||
|
|
||||||
#include <plasma/packagestructure.h>
|
#include <plasma/packagestructure.h>
|
||||||
|
#include "plasma.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
@ -43,6 +44,8 @@ public:
|
||||||
explicit ThemePackage(QObject *parent = 0);
|
explicit ThemePackage(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PackageStructure::Ptr defaultPackageStructure(ComponentType type);
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
|
||||||
#endif // LIBS_PLASMA_PACKAGES_P_H
|
#endif // LIBS_PLASMA_PACKAGES_P_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user