From 30d2f260dcf2958cffc5252138c8788edaa084f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 1 Jan 2012 13:26:15 +0100 Subject: [PATCH] Drop unused code --- scripting/meta.h | 30 ------------------------------ 1 file changed, 30 deletions(-) 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; -} } }