ContainmentView: Do not crash on an invalid corona metadata
On launching `plasmashell -wap notExistingName`, it's better to give a warning instead of crashing.
This commit is contained in:
parent
9976edcbc9
commit
c77377221b
@ -192,8 +192,14 @@ ContainmentView::ContainmentView(Plasma::Corona *corona, QWindow *parent)
|
||||
KDeclarative::KDeclarative kdeclarative;
|
||||
kdeclarative.setDeclarativeEngine(engine());
|
||||
//binds things like kconfig and icons
|
||||
kdeclarative.setTranslationDomain("plasma_shell_" + corona->package().metadata().pluginName());
|
||||
kdeclarative.setupBindings();
|
||||
|
||||
KPluginInfo info = corona->package().metadata();
|
||||
if (info.isValid()) {
|
||||
kdeclarative.setTranslationDomain("plasma_shell_" + info.pluginName());
|
||||
kdeclarative.setupBindings();
|
||||
} else {
|
||||
qWarning() << "Invalid corona package metadata";
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Invalid home screen package";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user