Skip to content

Commit

Permalink
Correctly set ownership of viewer in JavaScript-code
Browse files Browse the repository at this point in the history
  • Loading branch information
kjetilly committed Nov 22, 2013
1 parent 803ea0f commit 3dbf48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qtcontroller/scripting/ExposedModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ QScriptValue ExposedModel::getElementValue(const QString &key)
if (type == std::string("complexType")) {
Viewer* v = new Viewer(m_engine);
m_model->getElementValue(key.toStdString(), v->viewer());
return m_engine->newQObject(v);
return m_engine->newQObject(v, QScriptEngine::ScriptOwnership);
}
return QScriptValue();
}
Expand Down

0 comments on commit 3dbf48a

Please sign in to comment.