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
This commit is contained in:
Mathias Gottschlag 2012-04-24 09:31:00 +02:00 committed by Martin Gräßlin
parent 64a714b812
commit 1d2e3aa327

View file

@ -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)