Use __get__, so that accessor properties work correctly
authorLars Knoll <lars.knoll@digia.com>
Tue, 4 Dec 2012 22:12:51 +0000 (14:12 -0800)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 5 Dec 2012 00:05:16 +0000 (01:05 +0100)
Change-Id: I99f06c09017b50bffeb34a8158f0dbf902c75945
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_environment.cpp

index ca3c43b..0127b04 100644 (file)
@@ -271,8 +271,8 @@ Value ExecutionContext::getProperty(String *name)
         if (ctx->withObject) {
             With *w = ctx->withObject;
             while (w) {
-                if (PropertyDescriptor *pd = w->object->__getPropertyDescriptor__(this, name, &tmp))
-                    return pd->value;
+                if (w->object->__hasProperty__(ctx, name))
+                    return w->object->__get__(ctx, name);
                 w = w->next;
             }
         }