since dataengine objects are shared, we likely will already have a wrapper object for a dataengine so re-use them if they exist.

svn path=/trunk/KDE/kdebase/runtime/; revision=1083608
This commit is contained in:
Aaron J. Seigo 2010-02-01 16:18:49 +00:00
parent de26219d43
commit 0df331ac6c

View File

@ -398,7 +398,7 @@ QScriptValue SimpleJavaScriptApplet::dataEngine(QScriptContext *context, QScript
const QString dataEngine = context->argument(0).toString();
DataEngine *data = interface->dataEngine(dataEngine);
return engine->newQObject(data);
return engine->newQObject(data, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject);
}
QScriptValue SimpleJavaScriptApplet::service(QScriptContext *context, QScriptEngine *engine)