summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-02-15 15:33:18 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-02-15 15:54:03 (GMT)
commitd4135524762c9f702f5a22a8e399ad867f7050d7 (patch)
tree4f7cfaae91f10b51d62dca483286db75f9784a82
parenta39c5321bd812e3ce820fabd6a97eaf8a6c3d01c (diff)
downloadQt-d4135524762c9f702f5a22a8e399ad867f7050d7.zip
Qt-d4135524762c9f702f5a22a8e399ad867f7050d7.tar.gz
Qt-d4135524762c9f702f5a22a8e399ad867f7050d7.tar.bz2
Optimization: Avoid calling out to public API function
All the public QScriptEngine::create() function does is call the private implementation anyway, so call QScriptEnginePrivate::create() directly. Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-rw-r--r--src/script/api/qscriptengine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 1bd7377..237b6fd 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -846,8 +846,7 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
QScriptValue QScriptEnginePrivate::scriptValueFromVariant(const QVariant &v)
{
- Q_Q(QScriptEngine);
- QScriptValue result = q->create(v.userType(), v.data());
+ QScriptValue result = create(v.userType(), v.data());
Q_ASSERT(result.isValid());
return result;
}