diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-09 10:29:38 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-09 10:29:38 (GMT) |
commit | a657665e31e9fdabfc4e3913b4656046efe8b78d (patch) | |
tree | b6729687025cb47f70a3cfe9510d56237a3e0621 /tests/benchmarks/declarative | |
parent | 41f7ccb2dd21dcd4b0f2aa172bb813095cb2ade3 (diff) | |
download | Qt-a657665e31e9fdabfc4e3913b4656046efe8b78d.zip Qt-a657665e31e9fdabfc4e3913b4656046efe8b78d.tar.gz Qt-a657665e31e9fdabfc4e3913b4656046efe8b78d.tar.bz2 |
Optimization: Passing QScriptEngine to QScriptValue is much faster
Diffstat (limited to 'tests/benchmarks/declarative')
-rw-r--r-- | tests/benchmarks/declarative/script/tst_script.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/declarative/script/tst_script.cpp index 3c0805a..f417d0c 100644 --- a/tests/benchmarks/declarative/script/tst_script.cpp +++ b/tests/benchmarks/declarative/script/tst_script.cpp @@ -157,10 +157,10 @@ void tst_script::property_js() } } -static QScriptValue property_getter_method(QScriptContext *, QScriptEngine *) +static QScriptValue property_getter_method(QScriptContext *, QScriptEngine *engine) { static int x = 0; - return QScriptValue(x++); + return QScriptValue(engine,x++); } void tst_script::property_getter() |