Showing the changes to libraries/script-engine/src/ScriptEngineCast.h (1 of 16 files). Show all
Unified · Split
| @@ -115,24 +115,6 @@ int scriptRegisterMetaTypeWithLambdas(ScriptEngine* eng, · 114 unmodified lines | ||
| 115 | 115 | return id; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | −/* | |
| 119 | −template <typename T> | |
| 120 | −int scriptRegisterMetaTypeWithLambdas(ScriptEngine* eng, | |
| 121 | − ScriptValue (*toScriptValue)(ScriptEngine*, const T& t), | |
| 122 | − bool (*fromScriptValue)(const ScriptValue&, T& t), const char* name = "", | |
| 123 | − T* = 0) | |
| 124 | −{ | |
| 125 | − int id; | |
| 126 | − if (strlen(name) > 0) { // make sure it's registered | |
| 127 | − id = qRegisterMetaType<T>(name); | |
| 128 | − } else { | |
| 129 | − id = qRegisterMetaType<T>(); | |
| 130 | − } | |
| 131 | − eng->registerCustomType(id, reinterpret_cast<ScriptEngine::MarshalFunction>(toScriptValue), | |
| 132 | − reinterpret_cast<ScriptEngine::DemarshalFunction>(fromScriptValue)); | |
| 133 | − return id; | |
| 134 | −}*/ | |
| 135 | − | |
| 136 | 118 | template <class Container> |
| 137 | 119 | ScriptValue scriptValueFromSequence(ScriptEngine* eng, const Container& cont) { |
| 138 | 120 | ScriptValue a = eng->newArray(); |