aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetype_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/qqmlvaluetype_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/qqmlvaluetype_p.h')
-rw-r--r--src/qml/qml/qqmlvaluetype_p.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h
index cd9e51957d..5c411f0e57 100644
--- a/src/qml/qml/qqmlvaluetype_p.h
+++ b/src/qml/qml/qqmlvaluetype_p.h
@@ -63,42 +63,16 @@ public:
QQmlValueType(int userType, const QMetaObject *metaObject);
~QQmlValueType();
void read(QObject *, int);
- void readVariantValue(QObject *, int, QVariant *);
void write(QObject *, int, QQmlPropertyPrivate::WriteFlags flags);
- void writeVariantValue(QObject *, int, QQmlPropertyPrivate::WriteFlags, QVariant *);
QVariant value();
void setValue(const QVariant &);
- QString toString() const;
- bool isEqual(const QVariant &value) const;
-
- void *gadget() const { return gadgetPtr; }
-
- inline int userType() const
- {
- return typeId;
-
- }
// ---- dynamic meta object data interface
virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *);
virtual void objectDestroyed(QObject *);
virtual int metaCall(QObject *obj, QMetaObject::Call type, int _id, void **argv);
// ----
-protected:
- inline void readProperty(QObject *obj, int idx, void *p)
- {
- void *a[] = { p, 0 };
- QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
- }
-
- inline void writeProperty(QObject *obj, int idx, QQmlPropertyPrivate::WriteFlags flags, void *p)
- {
- int status = -1;
- void *a[] = { p, 0, &status, &flags };
- QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
- }
-
private:
const QMetaObject *_metaObject;
int typeId;