in 4.4, the engine isn't a share impl and register enums is just a file local function

svn path=/branches/KDE/4.4/kdebase/runtime/; revision=1073897
This commit is contained in:
Aaron J. Seigo 2010-01-13 07:20:16 +00:00
parent e1a843f33f
commit 33091bd856

View File

@ -742,7 +742,7 @@ QScriptValue SimpleJavaScriptApplet::newPlasmaSvg(QScriptContext *context, QScri
Svg *svg = new Svg(parent);
svg->setImagePath(parentedToApplet ? findSvg(engine, filename) : filename);
QScriptValue fun = engine->newQObject(svg);
static_cast<ScriptEnv*>(engine)->registerEnums(fun, *svg->metaObject());
registerEnums(fun, *svg->metaObject());
return fun;
}
@ -761,7 +761,7 @@ QScriptValue SimpleJavaScriptApplet::newPlasmaFrameSvg(QScriptContext *context,
QScriptValue fun = engine->newQObject(frameSvg);
// FIXME: why is this necessary when it is clearly declared in FrameSvg's moc?
static_cast<ScriptEnv*>(engine)->registerEnums(fun, *frameSvg->metaObject());
registerEnums(fun, *frameSvg->metaObject());
return fun;
}