Commit ad6ef647 authored by Marco Martin's avatar Marco Martin
Browse files

try to be more flexible in path search

this may be a possible solution to packages not being loaded with non standard install paths
CCBUG:298237
parent 2d6e7510
......@@ -82,7 +82,23 @@ void ActivityManagerPrivate::init(Plasma::Location loc)
Plasma::PackageStructure::Ptr structure = Plasma::PackageStructure::load("Plasma/Generic");
package = new Plasma::Package(QString(), "org.kde.desktop.activitymanager", structure);
QString path;
const QString pluginName = "org.kde.desktop.activitymanager";
QString subPath = structure->defaultPackageRoot() + pluginName + '/';
path = KStandardDirs::locate("data", subPath + "metadata.desktop");
if (path.isEmpty()) {
path = KStandardDirs::locate("data", subPath);
} else {
path.remove(QString("metadata.desktop"));
}
if (!path.endsWith('/')) {
path.append('/');
}
structure->setPath(path);
package = new Plasma::Package(path, pluginName, structure);
declarativeWidget = new Plasma::DeclarativeWidget(q);
declarativeWidget->setInitializationDelayed(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment