summaryrefslogtreecommitdiffstats
path: root/examples/script
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-05 09:38:41 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-06 09:06:17 (GMT)
commit4232955aa9498a5e1e4e4b3fb4662222acffe70f (patch)
tree7c1710aadf6a405c540f537596340581bc491102 /examples/script
parent6f09167b4fde25e04611557549a0d0d0cfd6a6ae (diff)
downloadQt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.zip
Qt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.tar.gz
Qt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.tar.bz2
Remove usage of deprecated QScriptValue* function
Tests were untouched. Regexp used: git grep -O"sed -i 's/qScriptValueFromQMetaObject *<\([^>]*\)> *(\([^&*\(),]*\))/\\2->scriptValueFromQMetaObject<\\1>()/g'" qScriptValueFromQMetaObject git grep -O"sed -i 's/qScriptValueFromValue(this, */toScriptValue(/'" qScriptValueFromValue git grep -O"sed -i 's/qScriptValueFromValue(\([^&*\(),]*\), */\\1->toScriptValue(/'" qScriptValueFromValue git grep -O"sed -i 's/qScriptValueFromValue(&\([^&*\(),]*\), */\\1.toScriptValue(/'" qScriptValueFromValue git grep -O"sed -i 's/qScriptValueToValue</qscriptvalue_cast</'" qScriptValueToValue Rev-by: dev mailing list
Diffstat (limited to 'examples/script')
-rw-r--r--examples/script/customclass/bytearrayclass.cpp2
-rw-r--r--examples/script/marshal/main.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/script/customclass/bytearrayclass.cpp b/examples/script/customclass/bytearrayclass.cpp
index 0a1ad2d..7bf6d3f 100644
--- a/examples/script/customclass/bytearrayclass.cpp
+++ b/examples/script/customclass/bytearrayclass.cpp
@@ -88,7 +88,7 @@ ByteArrayClass::ByteArrayClass(QScriptEngine *engine)
proto.setPrototype(global.property("Object").property("prototype"));
ctor = engine->newFunction(construct, proto);
- ctor.setData(qScriptValueFromValue(engine, this));
+ ctor.setData(engine->toScriptValue(this));
}
//! [0]
diff --git a/examples/script/marshal/main.cpp b/examples/script/marshal/main.cpp
index adfeaf1..270cb56 100644
--- a/examples/script/marshal/main.cpp
+++ b/examples/script/marshal/main.cpp
@@ -49,7 +49,7 @@ QScriptValue toScriptValue(QScriptEngine *eng, const Container &cont)
typename Container::const_iterator end = cont.end();
typename Container::const_iterator it;
for (it = begin; it != end; ++it)
- a.setProperty(quint32(it - begin), qScriptValueFromValue(eng, *it));
+ a.setProperty(quint32(it - begin), eng->toScriptValue(*it));
return a;
}