if an inexisting library was specified, fallback
fallback to empty Applet/containment if an inexisting library was specified in the metadata file. this fixes old applets with incorrect metadata BUG:344281 Change-Id: I0efc9dc32dee0e6fe4f3757065004a19f6e01844
This commit is contained in:
parent
ffcb5c8046
commit
2bbb9dda7f
@ -230,7 +230,17 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
||||
applet = offer->createInstance<Plasma::Applet>(0, allArgs, &error);
|
||||
|
||||
if (!applet) {
|
||||
qWarning() << "Could not load applet" << name << "! reason given:" << error;
|
||||
qWarning() << "Could not load applet" << name << "! reason given:" << error <<"Falling back to an empty one";
|
||||
|
||||
if (isContainment) {
|
||||
return new Containment(0, allArgs);
|
||||
} else {
|
||||
if (offer->serviceTypes().contains("Plasma/Containment")) {
|
||||
return new Containment(0, allArgs);
|
||||
} else {
|
||||
return new Applet(0, allArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return applet;
|
||||
|
Loading…
Reference in New Issue
Block a user