don't use PackageMetadata
This commit is contained in:
parent
61dae1cad0
commit
be8b64f95c
@ -413,16 +413,23 @@ void AbstractRunnerPrivate::init(const KService::Ptr service)
|
||||
|
||||
void AbstractRunnerPrivate::init(const QString &path)
|
||||
{
|
||||
prepScripting(path);
|
||||
runnerDescription = KPluginInfo(path + "/metadata.desktop");
|
||||
const QString api = runnerDescription.property("X-Plasma-API").toString();
|
||||
prepScripting(path, api);
|
||||
}
|
||||
|
||||
void AbstractRunnerPrivate::prepScripting(const QString &path, QString api)
|
||||
void AbstractRunnerPrivate::prepScripting(const QString &path, const QString &api)
|
||||
{
|
||||
if (script) {
|
||||
return;
|
||||
}
|
||||
|
||||
delete package;
|
||||
package = 0;
|
||||
|
||||
if (api.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::RunnerComponent);
|
||||
structure->setPath(path);
|
||||
@ -435,10 +442,6 @@ void AbstractRunnerPrivate::prepScripting(const QString &path, QString api)
|
||||
return;
|
||||
}
|
||||
|
||||
if (api.isEmpty()) {
|
||||
api = package->metadata().implementationApi();
|
||||
}
|
||||
|
||||
script = Plasma::loadScriptEngine(api, runner);
|
||||
if (!script) {
|
||||
delete package;
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
~AbstractRunnerPrivate();
|
||||
void init(const KService::Ptr service);
|
||||
void init(const QString &path);
|
||||
void prepScripting(const QString &path, QString api = QString());
|
||||
void prepScripting(const QString &path, const QString &api);
|
||||
void setupScriptSupport();
|
||||
|
||||
AbstractRunner::Priority priority;
|
||||
|
Loading…
Reference in New Issue
Block a user