Dependency resolution code was moved to KPackage
Summary: Depends on D3299. Test Plan: plasma still starts with all plasmoids Reviewers: #plasma, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3311
This commit is contained in:
parent
76d137e594
commit
edbccc5fca
|
@ -212,23 +212,7 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
|||
}
|
||||
|
||||
|
||||
KPackage::Package p = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Applet"), name);
|
||||
if (!p.isValid()) {
|
||||
//some applets have actually the root path from another package, such as icontasks
|
||||
//try to do a fallback package with X-Plasma-RootPath root
|
||||
p.setRequired("mainscript", false);
|
||||
p.setPath(name);
|
||||
|
||||
const KPluginMetaData md(p.metadata());
|
||||
const KPackage::Package fp = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Applet"), md.value(QStringLiteral("X-Plasma-RootPath")));
|
||||
p.setFallbackPackage(fp);
|
||||
|
||||
if (!fp.isValid()) {
|
||||
qCWarning(LOG_PLASMA) << "invalid fallback path in " << p.path();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const KPackage::Package p = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Applet"), name);
|
||||
if (!applet) {
|
||||
//qCDebug(LOG_PLASMA) << name << "not a C++ applet: Falling back to an empty one";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user