From: Girish Ramakrishnan Date: Fri, 11 May 2012 16:01:43 +0000 (-0700) Subject: doc: Remove references to QScript* X-Git-Tag: upstream/5.2.1~1878 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fec5068733373750d3a913fe3e6b3464a3f7275b;p=platform%2Fupstream%2Fqtdeclarative.git doc: Remove references to QScript* The second document snippet won't work anymore since the equivalent of QScriptValue::PropertyFlag doesn't exist. It is thus removed. Change-Id: Ib8fadef6c6aec4bc257cc245bb58948f64b69945 Reviewed-by: Casper van Donderen --- diff --git a/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp b/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp index e26b999..46083aa 100644 --- a/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp +++ b/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp @@ -39,9 +39,9 @@ ****************************************************************************/ //! [0] -QScriptValue object; +QJSValue object; ... -QScriptValueIterator it(object); +QJSValueIterator it(object); while (it.hasNext()) { it.next(); qDebug() << it.name() << ": " << it.value().toString(); @@ -50,9 +50,9 @@ while (it.hasNext()) { //! [1] -QScriptValue obj = ...; // the object to iterate over +QJSValue obj = ...; // the object to iterate over while (obj.isObject()) { - QScriptValueIterator it(obj); + QJSValueIterator it(obj); while (it.hasNext()) { it.next(); qDebug() << it.name(); @@ -61,12 +61,3 @@ while (obj.isObject()) { } //! [1] - -//! [2] -while (it.hasNext()) { - it.next(); - if (it.flags() & QScriptValue::SkipInEnumeration) - continue; - qDebug() << "found enumerated property:" << it.name(); -} -//! [2] diff --git a/src/qml/qml/v8/qjsvalueiterator.cpp b/src/qml/qml/v8/qjsvalueiterator.cpp index 3135c2f..8925779 100644 --- a/src/qml/qml/v8/qjsvalueiterator.cpp +++ b/src/qml/qml/v8/qjsvalueiterator.cpp @@ -56,13 +56,6 @@ QT_BEGIN_NAMESPACE \snippet doc/snippets/code/src_script_qjsvalueiterator.cpp 1 - Note that QJSValueIterator will not automatically skip over - properties that have the QJSValue::SkipInEnumeration flag set; - that flag only affects iteration in script code. If you want, you - can skip over such properties with code like the following: - - \snippet doc/snippets/code/src_script_qjsvalueiterator.cpp 2 - \sa QJSValue::property() */