aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qjsvalue_p.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_p.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_p.h')
-rw-r--r--src/declarative/qml/v8/qjsvalue_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/v8/qjsvalue_p.h b/src/declarative/qml/v8/qjsvalue_p.h
index 364742532c..c3677e351d 100644
--- a/src/declarative/qml/v8/qjsvalue_p.h
+++ b/src/declarative/qml/v8/qjsvalue_p.h
@@ -130,6 +130,8 @@ public:
template<typename T>
inline QScriptPassPointer<QJSValuePrivate> property(T name) const;
inline bool deleteProperty(const QString& name);
+ inline bool hasProperty(const QString &name) const;
+ inline bool hasOwnProperty(const QString &name) const;
inline QJSValue::PropertyFlags propertyFlags(const QString& name) const;
inline QJSValue::PropertyFlags propertyFlags(v8::Handle<v8::String> name) const;