From 45a83b43ea431a27a7ea05e7e621013dfcfe409a Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 18 Jan 2012 09:50:31 +0100 Subject: Add QJSValue::hasProperty() and hasOwnProperty() functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jędrzej Nowacki --- tests/auto/declarative/qjsvalue/tst_qjsvalue.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/declarative/qjsvalue/tst_qjsvalue.h') diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h index 2e11832f07..7f7c04abe8 100644 --- a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h @@ -113,6 +113,10 @@ private slots: void equals(); void strictlyEquals(); + void hasProperty_basic(); + void hasProperty_globalObject(); + void hasProperty_changePrototype(); + void getSetPrototype_cyclicPrototype(); void getSetPrototype_evalCyclicPrototype(); void getSetPrototype_eval(); -- cgit v1.2.3 From 23805ae47898a1ae4b5c8d8bb30b8b69d2fc435a Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 18 Jan 2012 10:00:02 +0100 Subject: Add QJSValue::deleteProperty() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it possible to delete a property without relying on passing a QJSValue of invalid type to setProperty() (the invalid type is going to be removed). Task-number: QTBUG-23604 Change-Id: I653b3349050ad1aac1cf6ccc8547c753abbb9f1d Reviewed-by: Simon Hausmann Reviewed-by: Jędrzej Nowacki --- tests/auto/declarative/qjsvalue/tst_qjsvalue.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/declarative/qjsvalue/tst_qjsvalue.h') diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h index 7f7c04abe8..7696f61a06 100644 --- a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h @@ -117,6 +117,10 @@ private slots: void hasProperty_globalObject(); void hasProperty_changePrototype(); + void deleteProperty_basic(); + void deleteProperty_globalObject(); + void deleteProperty_inPrototype(); + void getSetPrototype_cyclicPrototype(); void getSetPrototype_evalCyclicPrototype(); void getSetPrototype_eval(); -- cgit v1.2.3 From 846b66d46a1e0f4f0baf9bed387c588f6faf8e0c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 18 Jan 2012 13:12:00 +0100 Subject: Add QJSValue::toInt() and toUInt() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These replace toInt32() and toUInt32(), which are obsolete and will be removed. Task-number: QTBUG-23604 Change-Id: I83c055dbbe399fa7242889cee8a177440a693d9a Reviewed-by: Simon Hausmann Reviewed-by: Jędrzej Nowacki --- tests/auto/declarative/qjsvalue/tst_qjsvalue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/declarative/qjsvalue/tst_qjsvalue.h') diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h index 7696f61a06..b07d746139 100644 --- a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h @@ -86,8 +86,8 @@ private slots: void toBoolean(); void toBool(); void toInteger(); - void toInt32(); - void toUInt32(); + void toInt(); + void toUInt(); void toUInt16(); void toVariant(); void toQObject_nonQObject_data(); -- cgit v1.2.3 From e6b224aa2872d7d1030fa98bd30603e16f8f9604 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 20 Jan 2012 14:04:27 +1000 Subject: Update obsolete contact address. Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern Reviewed-by: Alan Alpert --- tests/auto/declarative/qjsvalue/tst_qjsvalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/declarative/qjsvalue/tst_qjsvalue.h') diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h index b07d746139..b6e6f51079 100644 --- a/tests/auto/declarative/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/declarative/qjsvalue/tst_qjsvalue.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** -- cgit v1.2.3