doc: Remove references to QScript*
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Fri, 11 May 2012 16:01:43 +0000 (09:01 -0700)
committerQt by Nokia <qt-info@nokia.com>
Mon, 14 May 2012 23:14:08 +0000 (01:14 +0200)
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 <casper.vandonderen@nokia.com>
src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp
src/qml/qml/v8/qjsvalueiterator.cpp

index e26b999..46083aa 100644 (file)
@@ -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]
index 3135c2f..8925779 100644 (file)
@@ -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()
 */