summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptengine.h')
-rw-r--r--src/script/api/qscriptengine.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h
index 830d477..24c8c13 100644
--- a/src/script/api/qscriptengine.h
+++ b/src/script/api/qscriptengine.h
@@ -332,10 +332,7 @@ inline QScriptValue qScriptValueFromValue(QScriptEngine *engine, const T &t)
template <>
inline QScriptValue qScriptValueFromValue<QVariant>(QScriptEngine *engine, const QVariant &v)
{
- QScriptValue result = qScriptValueFromValue_helper(engine, v.userType(), v.data());
- if (!result.isValid())
- result = engine->newVariant(v);
- return result;
+ return qScriptValueFromValue_helper(engine, v.userType(), v.data());
}
inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *ptr)