diff --git a/scripting/meta.h b/scripting/meta.h index 8fd8366d9f..add2b44578 100644 --- a/scripting/meta.h +++ b/scripting/meta.h @@ -80,17 +80,6 @@ QScriptValue toScriptValue(QScriptEngine*, const QRect&); void fromScriptValue(const QScriptValue&, QRect&); } -/** - * The Reference wrapping used previously for storing pointers to objects that were - * wrapped. Can still be used for non-QObject converted QScriptValue's, but as of - * now, it is not in use anywhere. - */ -namespace RefWrapping -{ -// Simple template class to wrap pointers within QScriptValue's -template void embed(QScriptValue&, const T); -template T extract(const QScriptValue&); -} /** * Merges the second QScriptValue in the first one. @@ -121,25 +110,6 @@ void supplyConfig(QScriptEngine*, const QVariant&); */ void supplyConfig(QScriptEngine*); -// RefWrapping may be used for objects who use pointer based scriptvalue -// storage, but do not use caching. -template -void RefWrapping::embed(QScriptValue& value, const T datum) -{ - QScriptEngine* eng = value.engine(); - value.setData(qScriptValueFromValue(eng, - static_cast( - const_cast(datum) - ) - )); -} - -template -T RefWrapping::extract(const QScriptValue& value) -{ - T datum = static_cast(qscriptvalue_cast(value.data())); - return datum; -} } }