crash-- move after first call to applet()
This commit is contained in:
parent
1d5ec8c2e0
commit
756b3f1685
@ -70,7 +70,6 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant
|
||||
m_env(0),
|
||||
m_auth(this)
|
||||
{
|
||||
KGlobal::locale()->insertCatalog(description().pluginName());
|
||||
Q_UNUSED(args);
|
||||
}
|
||||
|
||||
@ -82,6 +81,7 @@ bool DeclarativeAppletScript::init()
|
||||
{
|
||||
m_declarativeWidget = new Plasma::DeclarativeWidget(applet());
|
||||
m_declarativeWidget->setInitializationDelayed(true);
|
||||
KGlobal::locale()->insertCatalog(description().pluginName());
|
||||
|
||||
//make possible to import extensions from the package
|
||||
//FIXME: probably to be removed, would make possible to use native code from within the package :/
|
||||
|
@ -105,8 +105,6 @@ SimpleJavaScriptApplet::SimpleJavaScriptApplet(QObject *parent, const QVariantLi
|
||||
Q_UNUSED(args);
|
||||
// kDebug() << "Script applet launched, args" << applet()->startupArguments();
|
||||
|
||||
KGlobal::locale()->insertCatalog(description().pluginName());
|
||||
|
||||
// TODO this will be set to the engine we get from QML
|
||||
m_engine = new QScriptEngine(this);
|
||||
m_env = new ScriptEnv(this, m_engine);
|
||||
@ -311,6 +309,7 @@ bool SimpleJavaScriptApplet::init()
|
||||
this, SLOT(extenderItemRestored(Plasma::ExtenderItem*)));
|
||||
connect(applet(), SIGNAL(activate()),
|
||||
this, SLOT(activate()));
|
||||
KGlobal::locale()->insertCatalog(description().pluginName());
|
||||
setupObjects();
|
||||
|
||||
AppletAuthorization auth(this);
|
||||
|
Loading…
Reference in New Issue
Block a user