Better set the QScript export of a Client

We don't want the script to delete our Client, or do we?
This commit is contained in:
Martin Gräßlin 2012-01-01 10:00:13 +01:00
parent 11be6d5b40
commit 510a07a135

View file

@ -25,7 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
KWin::Workspace* SWrapper::Workspace::centralObject = 0;
QScriptValue SWrapper::valueForClient(KWin::Client *client, QScriptEngine *engine) {
return engine->newQObject(client);
return engine->newQObject(client, QScriptEngine::QtOwnership,
QScriptEngine::ExcludeChildObjects | QScriptEngine::ExcludeDeleteLater | QScriptEngine::PreferExistingWrapperObject);
}
SWrapper::Workspace::Workspace(QObject* parent) : QObject(parent)