From 1d2e3aa327f6269042b89dfcdb9305223dab89d3 Mon Sep 17 00:00:00 2001 From: Mathias Gottschlag Date: Tue, 24 Apr 2012 09:31:00 +0200 Subject: [PATCH] Let kwin scripts add dynamic properties to client objects. This enables the script wrapper objects to automatically create new dynamic properties for Client objects so that scripts can register custom properties. REVIEW: 104697 --- scripting/meta.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripting/meta.cpp b/scripting/meta.cpp index 92f11ebf2d..47dc8bc177 100644 --- a/scripting/meta.cpp +++ b/scripting/meta.cpp @@ -99,7 +99,10 @@ void Rect::fromScriptValue(const QScriptValue& obj, QRect &rect) QScriptValue Client::toScriptValue(QScriptEngine *eng, const KClientRef &client) { return eng->newQObject(client, QScriptEngine::QtOwnership, - QScriptEngine::ExcludeChildObjects | QScriptEngine::ExcludeDeleteLater | QScriptEngine::PreferExistingWrapperObject); + QScriptEngine::ExcludeChildObjects | + QScriptEngine::ExcludeDeleteLater | + QScriptEngine::PreferExistingWrapperObject | + QScriptEngine::AutoCreateDynamicProperties); } void Client::fromScriptValue(const QScriptValue &value, KWin::Client* &client)