aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qjsvalue.h
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-18 09:50:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-20 23:35:18 +0100
commit45a83b43ea431a27a7ea05e7e621013dfcfe409a (patch)
treefc379a3d1e7ba1297ca0cd7dd896f084447c4ca8 /src/declarative/qml/v8/qjsvalue.h
parentb4cd91c2409d5487cb576899f22f654a5bff93e2 (diff)
Add QJSValue::hasProperty() and hasOwnProperty() functions
These functions provide a way of querying whether a property exists, without relying on the QJSValue invalid type (which will be removed). Task-number: QTBUG-23604 Change-Id: I2efd53a1e54cc202ecc022d12730b2775384cf53 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qjsvalue.h')
-rw-r--r--src/declarative/qml/v8/qjsvalue.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h
index 6dcfe43d79..756081d842 100644
--- a/src/declarative/qml/v8/qjsvalue.h
+++ b/src/declarative/qml/v8/qjsvalue.h
@@ -128,6 +128,9 @@ public:
QJSValue property(const QString &name) const;
void setProperty(const QString &name, const QJSValue &value);
+ bool hasProperty(const QString &name) const;
+ bool hasOwnProperty(const QString &name) const;
+
QJSValue property(quint32 arrayIndex) const;
void setProperty(quint32 arrayIndex, const QJSValue &value);