From b07076032d45253414b855165c8341ad3b92915e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 27 Nov 2009 21:31:43 +0000 Subject: [PATCH] clean up api svn path=/trunk/KDE/kdebase/runtime/; revision=1055360 --- .../javascript/simplebindings/anchorlayout.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scriptengines/javascript/simplebindings/anchorlayout.cpp b/scriptengines/javascript/simplebindings/anchorlayout.cpp index 70abd73fd..27fcfa1f0 100644 --- a/scriptengines/javascript/simplebindings/anchorlayout.cpp +++ b/scriptengines/javascript/simplebindings/anchorlayout.cpp @@ -151,9 +151,15 @@ QScriptValue constructAnchorLayoutClass(QScriptEngine *eng) QScript::wrapPointer(eng, new QGraphicsAnchorLayout(), QScript::UserOwnership); + const QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter; + const QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter; + + proto.setProperty("horizontalSpacing", eng->newFunction(horizontalSpacing), getter); + proto.setProperty("horizontalSpacing", eng->newFunction(setHorizontalSpacing), setter); + proto.setProperty("verticalSpacing", eng->newFunction(verticalSpacing), getter); + proto.setProperty("verticalSpacing", eng->newFunction(setVerticalSpacing), setter); + ADD_METHOD(proto, setSpacing); - ADD_GET_SET_METHODS(proto, horizontalSpacing, setHorizontalSpacing); - ADD_GET_SET_METHODS(proto, verticalSpacing, setVerticalSpacing); ADD_METHOD(proto, removeAt); ADD_METHOD(proto, addAnchor); ADD_METHOD(proto, anchor);