use the applet plugin domain instead
This commit is contained in:
parent
bc8e285a16
commit
f457c5254a
@ -79,10 +79,16 @@ ConfigViewPrivate::ConfigViewPrivate(Plasma::Applet *appl, ConfigView *view)
|
|||||||
|
|
||||||
void ConfigViewPrivate::init()
|
void ConfigViewPrivate::init()
|
||||||
{
|
{
|
||||||
|
if (!applet) {
|
||||||
|
qWarning() << "Null applet passed to constructor";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
applet.data()->setUserConfiguring(true);
|
applet.data()->setUserConfiguring(true);
|
||||||
|
|
||||||
KDeclarative::KDeclarative kdeclarative;
|
KDeclarative::KDeclarative kdeclarative;
|
||||||
kdeclarative.setDeclarativeEngine(q->engine());
|
kdeclarative.setDeclarativeEngine(q->engine());
|
||||||
|
kdeclarative.setTranslationDomain(applet.data()->pluginInfo().pluginName());
|
||||||
kdeclarative.setupBindings();
|
kdeclarative.setupBindings();
|
||||||
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
|
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
|
||||||
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
|
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
|
||||||
@ -106,14 +112,8 @@ void ConfigViewPrivate::init()
|
|||||||
if (corona->package().isValid()) {
|
if (corona->package().isValid()) {
|
||||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(q->engine(), corona->package());
|
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(q->engine(), corona->package());
|
||||||
q->engine()->setUrlInterceptor(interceptor);
|
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);
|
q->setResizeMode(QQuickView::SizeViewToRootObject);
|
||||||
|
|
||||||
//config model local of the applet
|
//config model local of the applet
|
||||||
|
Loading…
Reference in New Issue
Block a user