use QQuickViewSharedEngine::setTranslationDomain
setting the domain by just using kdeclarative would lead to setting the domain on the wrong QQmlContext, sometimes overwriting it on the global context, causing unexpected crashes deep in qml BUG:361513 reviewed-by: Ivan Čukić <ivan.cukic@kde.org>
This commit is contained in:
parent
5f8f7db226
commit
f1699fe543
@ -189,14 +189,9 @@ ContainmentView::ContainmentView(Plasma::Corona *corona, QWindow *parent)
|
|||||||
this, &ContainmentView::screenGeometryChanged);
|
this, &ContainmentView::screenGeometryChanged);
|
||||||
|
|
||||||
if (corona->package().isValid()) {
|
if (corona->package().isValid()) {
|
||||||
KDeclarative::KDeclarative kdeclarative;
|
|
||||||
kdeclarative.setDeclarativeEngine(engine());
|
|
||||||
//binds things like kconfig and icons
|
|
||||||
|
|
||||||
KPluginInfo info = corona->package().metadata();
|
KPluginInfo info = corona->package().metadata();
|
||||||
if (info.isValid()) {
|
if (info.isValid()) {
|
||||||
kdeclarative.setTranslationDomain("plasma_shell_" + info.pluginName());
|
setTranslationDomain("plasma_shell_" + info.pluginName());
|
||||||
kdeclarative.setupBindings();
|
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "Invalid corona package metadata";
|
qWarning() << "Invalid corona package metadata";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user