aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-11-19 18:12:21 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-28 18:39:51 +0100
commitb7bcde88a35c0dba8bf78b829b60a634137fc778 (patch)
tree34395bdc64775394b8406511c86924c05a9ce73c /src/qml/qml/qqmlvaluetypewrapper_p.h
parent7dd5895854087c006d9ec58ada6899df6020b3c6 (diff)
Removed usage of QQmlValueType in QQmlValueTypeWrapper
QQmlValueType doesn't have anything really necessary :). Some code it has, but that was only called from the wrapper, so it was moved there. This also reduces one level of memory allocation for the wrapper. In theory the allocation for the JavaScript wrapper could be changed to be the size of the wrapper _plus_ the size needed for the gadget. However in anticipation of wanting to be able to move objects, we can't do that as we can't memmove() gadgets around - they might contain pointers to memory areas within. Change-Id: Icb5a6f5513e3b2c87f6639f6f7b1fb572af08137 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper_p.h')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper_p.h b/src/qml/qml/qqmlvaluetypewrapper_p.h
index 24031800cd..ad883266bd 100644
--- a/src/qml/qml/qqmlvaluetypewrapper_p.h
+++ b/src/qml/qml/qqmlvaluetypewrapper_p.h
@@ -53,7 +53,6 @@
QT_BEGIN_NAMESPACE
-class QQmlValueType;
class QV8Engine;
namespace QV4 {
@@ -62,8 +61,14 @@ namespace Heap {
struct QQmlValueTypeWrapper : Object {
QQmlValueTypeWrapper(ExecutionEngine *engine);
+ ~QQmlValueTypeWrapper();
mutable QQmlRefPointer<QQmlPropertyCache> propertyCache;
- mutable QScopedPointer<QQmlValueType> type;
+ mutable void *gadgetPtr;
+ mutable int metaType;
+
+ void setValue(const QVariant &value) const;
+ QVariant toVariant() const;
+ void *gadget() const { return gadgetPtr; }
};
}