aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-11 09:01:43 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-15 01:14:08 +0200
commitfec5068733373750d3a913fe3e6b3464a3f7275b (patch)
tree380910fbb1e3634e838b7a83862f2d338478ad7e /src/qml
parentdbcbce68850c388db65c6541705d41c9b5acea15 (diff)
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 <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp17
-rw-r--r--src/qml/qml/v8/qjsvalueiterator.cpp7
2 files changed, 4 insertions, 20 deletions
diff --git a/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp b/src/qml/doc/snippets/code/src_script_qjsvalueiterator.cpp
index e26b9992f4..46083aa406 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 3135c2fd77..8925779d6b 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()
*/