diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-09-18 09:56:46 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-18 09:59:05 (GMT) |
commit | 331b03388e0a12e0f313b9d186d7cd4153dd04e4 (patch) | |
tree | b9ab4368ff5add73149f9b63439a770a21b667ef /src/script/api | |
parent | cb9e93a54270871e0eae688d286b775f2995dda9 (diff) | |
download | Qt-331b03388e0a12e0f313b9d186d7cd4153dd04e4.zip Qt-331b03388e0a12e0f313b9d186d7cd4153dd04e4.tar.gz Qt-331b03388e0a12e0f313b9d186d7cd4153dd04e4.tar.bz2 |
make qscriptvalue_cast<QVariant>() compile again on Windows
This change was lost when the new qtscript-jsc backend was introduced
(the change is already in 4.5).
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.h | 6 |
1 files 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<typename T> 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<QVariant>(const QScriptValue &value, QVariant *) +inline QVariant qscriptvalue_cast<QVariant>(const QScriptValue &value) { return value.toVariant(); } +#endif template <typename T> inline T qScriptValueToValue(const QScriptValue &value) |