From bc8e285a16298a576cf41af56b1173789d5a14b3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 5 Jun 2014 14:08:19 +0200 Subject: [PATCH] set translation domain as the corona plugin name applet configuration dialogs may need to always use i18nc :/ --- src/plasmaquick/configview.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plasmaquick/configview.cpp b/src/plasmaquick/configview.cpp index 0d37f0359..7fbc18229 100644 --- a/src/plasmaquick/configview.cpp +++ b/src/plasmaquick/configview.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -102,6 +103,17 @@ void ConfigViewPrivate::init() corona = applet.data()->containment()->corona(); } + if (corona->package().isValid()) { + PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(q->engine(), corona->package()); + q->engine()->setUrlInterceptor(interceptor); + + KDeclarative::KDeclarative kdeclarative; + kdeclarative.setDeclarativeEngine(q->engine()); + //binds things like kconfig and icons + kdeclarative.setupBindings(); + kdeclarative.setTranslationDomain(corona->package().metadata().pluginName()); + } + q->setResizeMode(QQuickView::SizeViewToRootObject); //config model local of the applet