From d4135524762c9f702f5a22a8e399ad867f7050d7 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 15 Feb 2010 16:33:18 +0100 Subject: 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 --- src/script/api/qscriptengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 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; } -- cgit v0.12