diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-11-02 16:12:44 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-14 21:45:38 +0000 |
commit | 010197a42150ee73a17cb53fbe397a6c55b2d342 (patch) | |
tree | 9fde23184f1dd07fc30a1b3cfa0f9a3de618eb38 | |
parent | e4e2761d6e0f6b24bed63d4151bd8cb544d207e2 (diff) |
Get rid of the last usage of the V4_OBJECT macro
It's been deprecated for quite a long time.
Change-Id: I075f8c0204edbadb7430ca6e380b2760e1775b4e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
-rw-r--r-- | src/particles/qquickv4particledata.cpp | 27 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 15 |
2 files changed, 15 insertions, 27 deletions
diff --git a/src/particles/qquickv4particledata.cpp b/src/particles/qquickv4particledata.cpp index ee1c334536..acb37f25bf 100644 --- a/src/particles/qquickv4particledata.cpp +++ b/src/particles/qquickv4particledata.cpp @@ -267,22 +267,25 @@ QT_BEGIN_NAMESPACE The currentSize of the particle, interpolating between startSize and endSize based on the currentTime. */ - +namespace QV4 { +namespace Heap { +struct QV4ParticleData : QV4::Object::Data { + void init(QQuickParticleData *datum, QQuickParticleSystem* particleSystem) + { + Object::init(); + this->datum = datum; + this->particleSystem = particleSystem; + } + QQuickParticleData* datum;//TODO: Guard needed? + QQuickParticleSystem* particleSystem; +}; +} +} //### Particle data handles are not locked to within certain scopes like QQuickContext2D, but there's no way to reload either... struct QV4ParticleData : public QV4::Object { - struct Data : QV4::Object::Data { - void init(QQuickParticleData *datum, QQuickParticleSystem* particleSystem) - { - Object::init(); - this->datum = datum; - this->particleSystem = particleSystem; - } - QQuickParticleData* datum;//TODO: Guard needed? - QQuickParticleSystem* particleSystem; - }; - V4_OBJECT(QV4::Object) + V4_OBJECT2(QV4ParticleData, QV4::Object) }; DEFINE_OBJECT_VTABLE(QV4ParticleData); diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 9a1cb2c696..cfec387f44 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -133,21 +133,6 @@ Q_STATIC_ASSERT(Object::markTable == ((2 << 2) | (2 << 4))); } -#define V4_OBJECT(superClass) \ - public: \ - Q_MANAGED_CHECK \ - typedef superClass SuperClass; \ - static const QV4::ObjectVTable static_vtbl; \ - static inline const QV4::VTable *staticVTable() { return &static_vtbl.vTable; } \ - V4_MANAGED_SIZE_TEST \ - Data *d_unchecked() const { return static_cast<Data *>(m()); } \ - Data *d() const { \ - Data *dptr = d_unchecked(); \ - dptr->_checkIsInitialized(); \ - return dptr; \ - } \ - V4_ASSERT_IS_TRIVIAL(Data); - #define V4_OBJECT2(DataClass, superClass) \ private: \ DataClass() Q_DECL_EQ_DELETE; \ |