use the applet plugin domain instead

This commit is contained in:
Marco Martin 2014-06-05 14:31:52 +02:00
parent bc8e285a16
commit f457c5254a

View File

@ -79,10 +79,16 @@ ConfigViewPrivate::ConfigViewPrivate(Plasma::Applet *appl, ConfigView *view)
void ConfigViewPrivate::init()
{
if (!applet) {
qWarning() << "Null applet passed to constructor";
return;
}
applet.data()->setUserConfiguring(true);
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(q->engine());
kdeclarative.setTranslationDomain(applet.data()->pluginInfo().pluginName());
kdeclarative.setupBindings();
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
@ -106,12 +112,6 @@ void ConfigViewPrivate::init()
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);