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.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h
index 3212ed5..6add6ed 100644
--- a/src/script/api/qscriptengine.h
+++ b/src/script/api/qscriptengine.h
@@ -65,13 +65,11 @@ inline QScriptValue qscriptQMetaObjectConstructor(QScriptContext *, QScriptEngin
class QRegExp;
#endif
-#ifndef QT_NO_MEMBER_TEMPLATES
template <typename T>
inline QScriptValue qScriptValueFromValue(QScriptEngine *, const T &);
template <typename T>
inline T qScriptValueToValue(const QScriptValue &);
-#endif
class QScriptSyntaxCheckResultPrivate;
class Q_SCRIPT_EXPORT QScriptSyntaxCheckResult
@@ -196,9 +194,7 @@ public:
QScriptValue newQMetaObject(const QMetaObject *metaObject, const QScriptValue &ctor = QScriptValue());
-# ifndef QT_NO_MEMBER_TEMPLATES
template <class T> QScriptValue scriptValueFromQMetaObject();
-# endif // QT_NO_MEMBER_TEMPLATES
#endif // QT_NO_QOBJECT
@@ -213,7 +209,6 @@ public:
-#ifndef QT_NO_MEMBER_TEMPLATES
template <typename T>
inline QScriptValue toScriptValue(const T &value)
{
@@ -224,7 +219,6 @@ public:
{
return qScriptValueToValue<T>(value);
}
-#endif // QT_NO_MEMBER_TEMPLATES
void installTranslatorFunctions(const QScriptValue &object = QScriptValue());
@@ -311,12 +305,10 @@ template<> inline QScriptValue qscriptQMetaObjectConstructor<T>(QScriptContext *
return o; \
}
-# ifndef QT_NO_MEMBER_TEMPLATES
template <class T> QScriptValue QScriptEngine::scriptValueFromQMetaObject()
{
return qScriptValueFromQMetaObject<T>(this);
}
-# endif // QT_NO_MEMBER_TEMPLATES
#endif // QT_NO_QOBJECT
@@ -349,11 +341,7 @@ inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *
}
template<typename T>
-T qscriptvalue_cast(const QScriptValue &value
-#if !defined qdoc && defined Q_CC_MSVC && _MSC_VER < 1300
-, T * = 0
-#endif
- )
+T qscriptvalue_cast(const QScriptValue &value)
{
T t;
const int id = qMetaTypeId<T>();
@@ -366,13 +354,11 @@ 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)
{
return value.toVariant();
}
-#endif
template <typename T>
inline T qScriptValueToValue(const QScriptValue &value)
@@ -428,11 +414,7 @@ void qScriptValueToSequence(const QScriptValue &value, Container &cont)
quint32 len = value.property(QLatin1String("length")).toUInt32();
for (quint32 i = 0; i < len; ++i) {
QScriptValue item = value.property(i);
-#if defined Q_CC_MSVC && !defined Q_CC_MSVC_NET
- cont.push_back(qscriptvalue_cast<Container::value_type>(item));
-#else
cont.push_back(qscriptvalue_cast<typename Container::value_type>(item));
-#endif
}
}