From 331b03388e0a12e0f313b9d186d7cd4153dd04e4 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 18 Sep 2009 11:56:46 +0200 Subject: make qscriptvalue_cast() compile again on Windows This change was lost when the new qtscript-jsc backend was introduced (the change is already in 4.5). --- src/script/api/qscriptengine.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h index 503e45e..701f9c6 100644 --- a/src/script/api/qscriptengine.h +++ b/src/script/api/qscriptengine.h @@ -363,7 +363,7 @@ inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void * template T qscriptvalue_cast(const QScriptValue &value -#ifndef Q_QDOC +#if !defined qdoc && defined Q_CC_MSVC && _MSC_VER < 1300 , T * = 0 #endif ) @@ -379,11 +379,13 @@ T qscriptvalue_cast(const QScriptValue &value return T(); } +#if !defined Q_CC_MSVC || _MSC_VER >= 1300 template <> -inline QVariant qscriptvalue_cast(const QScriptValue &value, QVariant *) +inline QVariant qscriptvalue_cast(const QScriptValue &value) { return value.toVariant(); } +#endif template inline T qScriptValueToValue(const QScriptValue &value) -- cgit v0.12