diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/qscriptengine.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h index c1b353a..caafd57 100644 --- a/src/script/api/qscriptengine.h +++ b/src/script/api/qscriptengine.h @@ -337,10 +337,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) |