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:
parent
de26219d43
commit
0df331ac6c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user