From a7fe2b895980ef203631d15375f175e25b9ca6a9 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 15 Apr 2010 14:07:13 +1000 Subject: Rename the ridiculous QDeclarativeDeclarativeData -> QDeclarativeData --- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 4 +- src/declarative/qml/qdeclarativebinding.cpp | 6 +- src/declarative/qml/qdeclarativebinding_p.h | 2 +- src/declarative/qml/qdeclarativecomponent.cpp | 4 +- src/declarative/qml/qdeclarativecontext.cpp | 4 +- src/declarative/qml/qdeclarativecontext_p.h | 4 +- src/declarative/qml/qdeclarativedata_p.h | 175 +++++++++++++++++++++ .../qml/qdeclarativedeclarativedata_p.h | 175 --------------------- src/declarative/qml/qdeclarativeengine.cpp | 38 ++--- src/declarative/qml/qdeclarativeenginedebug.cpp | 2 +- src/declarative/qml/qdeclarativeguard_p.h | 4 +- src/declarative/qml/qdeclarativeinfo.cpp | 4 +- .../qml/qdeclarativeobjectscriptclass.cpp | 14 +- src/declarative/qml/qdeclarativeproperty.cpp | 6 +- src/declarative/qml/qdeclarativepropertycache.cpp | 4 +- src/declarative/qml/qdeclarativevme.cpp | 26 +-- src/declarative/qml/qdeclarativevmemetaobject.cpp | 2 +- src/declarative/qml/qml.pri | 2 +- src/declarative/util/qdeclarativeanimation.cpp | 2 +- .../util/qdeclarativelistmodelworkeragent.cpp | 2 +- .../util/qdeclarativeopenmetaobject.cpp | 4 +- .../util/qdeclarativestateoperations.cpp | 2 +- 22 files changed, 243 insertions(+), 243 deletions(-) create mode 100644 src/declarative/qml/qdeclarativedata_p.h delete mode 100644 src/declarative/qml/qdeclarativedeclarativedata_p.h diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 03e4703..4365ea3 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -1058,7 +1058,7 @@ QString QDeclarativeVisualDataModel::stringValue(int index, const QString &name) tempData = true; } - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(data); + QDeclarativeData *ddata = QDeclarativeData::get(data); if (ddata && ddata->propertyCache) { QDeclarativePropertyCache::Data *prop = ddata->propertyCache->property(name); if (prop) { diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 664118d..25492ac 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -46,7 +46,7 @@ #include "qdeclarativecontext.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativecontext_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" #include @@ -296,7 +296,7 @@ void QDeclarativeAbstractBinding::addToObject(QObject *object) Q_ASSERT(!m_prevBinding); m_object = object; - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, true); + QDeclarativeData *data = QDeclarativeData::get(object, true); if (index & 0xFF000000) { // Value type @@ -348,7 +348,7 @@ void QDeclarativeAbstractBinding::removeFromObject() // Value type - we don't remove the proxy from the object. It will sit their happily // doing nothing for ever more. } else { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(m_object, false); + QDeclarativeData *data = QDeclarativeData::get(m_object, false); if (data) data->clearBindingBit(index); } diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 2789738..2d3acf5 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -92,7 +92,7 @@ protected: private: - friend class QDeclarativeDeclarativeData; + friend class QDeclarativeData; friend class QDeclarativeValueTypeProxyBinding; friend class QDeclarativePropertyPrivate; friend class QDeclarativeVME; diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 5f26ad5..1903006 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -518,7 +518,7 @@ QScriptValue QDeclarativeComponent::createObject() if (!ret) return QScriptValue(); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine); - QDeclarativeDeclarativeData::get(ret, true)->setImplicitDestructible(); + QDeclarativeData::get(ret, true)->setImplicitDestructible(); return priv->objectClass->newQObject(ret, QMetaType::QObjectStar); } @@ -581,7 +581,7 @@ QObject *QDeclarativeComponent::beginCreate(QDeclarativeContext *context) Q_D(QDeclarativeComponent); QObject *rv = d->beginCreate(context?QDeclarativeContextData::get(context):0, QBitField()); if (rv) { - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(rv); + QDeclarativeData *ddata = QDeclarativeData::get(rv); Q_ASSERT(ddata); ddata->indestructible = true; } diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index ba4da95..42e7386 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -525,7 +525,7 @@ void QDeclarativeContextData::destroy() expressions = 0; while (contextObjects) { - QDeclarativeDeclarativeData *co = contextObjects; + QDeclarativeData *co = contextObjects; contextObjects = contextObjects->nextContextObject; co->context = 0; @@ -608,7 +608,7 @@ void QDeclarativeContextData::refreshExpressions() void QDeclarativeContextData::addObject(QObject *o) { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(o, true); + QDeclarativeData *data = QDeclarativeData::get(o, true); Q_ASSERT(data->context == 0); diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h index 7a16179..5d26e7e 100644 --- a/src/declarative/qml/qdeclarativecontext_p.h +++ b/src/declarative/qml/qdeclarativecontext_p.h @@ -55,7 +55,7 @@ #include "qdeclarativecontext.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "private/qdeclarativeintegercache_p.h" #include "private/qdeclarativetypenamecache_p.h" #include "private/qdeclarativenotifier_p.h" @@ -166,7 +166,7 @@ public: QDeclarativeAbstractExpression *expressions; // Doubly-linked list of objects that are owned by this context - QDeclarativeDeclarativeData *contextObjects; + QDeclarativeData *contextObjects; // Doubly-linked list of context guards (XXX merge with contextObjects) QDeclarativeGuardedContextData *contextGuards; diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h new file mode 100644 index 0000000..3676d8d --- /dev/null +++ b/src/declarative/qml/qdeclarativedata_p.h @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDATA_P_H +#define QDECLARATIVEDATA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "private/qdeclarativeguard_p.h" + +QT_BEGIN_NAMESPACE + +class QDeclarativeCompiledData; +class QDeclarativeAbstractBinding; +class QDeclarativeContext; +class QDeclarativePropertyCache; +class QDeclarativeContextData; +// This class is structured in such a way, that simply zero'ing it is the +// default state for elemental object allocations. This is crucial in the +// workings of the QDeclarativeInstruction::CreateSimpleObject instruction. +// Don't change anything here without first considering that case! +class Q_AUTOTEST_EXPORT QDeclarativeData : public QAbstractDeclarativeData +{ +public: + QDeclarativeData() + : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), + context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), + bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), + attachedProperties(0), scriptValue(0), propertyCache(0), guards(0) { + init(); + } + + static inline void init() { + QAbstractDeclarativeData::destroyed = destroyed; + QAbstractDeclarativeData::parentChanged = parentChanged; + } + + static void destroyed(QAbstractDeclarativeData *, QObject *); + static void parentChanged(QAbstractDeclarativeData *, QObject *, QObject *); + + void destroyed(QObject *); + void parentChanged(QObject *, QObject *); + + void setImplicitDestructible() { + if (!explicitIndestructibleSet) indestructible = false; + } + + quint32 ownMemory:1; + quint32 ownContext:1; + quint32 indestructible:1; + quint32 explicitIndestructibleSet:1; + quint32 dummy:28; + + QDeclarativeContextData *context; + QDeclarativeContextData *outerContext; + + QDeclarativeAbstractBinding *bindings; + + // Linked list for QDeclarativeContext::contextObjects + QDeclarativeData *nextContextObject; + QDeclarativeData**prevContextObject; + + int bindingBitsSize; + quint32 *bindingBits; + bool hasBindingBit(int) const; + void clearBindingBit(int); + void setBindingBit(QObject *obj, int); + + ushort lineNumber; + ushort columnNumber; + + QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context? + unsigned int deferredIdx; + + QHash *attachedProperties; + + // ### Can we make this QScriptValuePrivate so we incur no additional allocation + // cost? + QScriptValue *scriptValue; + QDeclarativePropertyCache *propertyCache; + + QDeclarativeGuard *guards; + + static QDeclarativeData *get(const QObject *object, bool create = false) { + QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); + if (priv->wasDeleted) { + Q_ASSERT(!create); + return 0; + } else if (priv->declarativeData) { + return static_cast(priv->declarativeData); + } else if (create) { + priv->declarativeData = new QDeclarativeData; + return static_cast(priv->declarativeData); + } else { + return 0; + } + } +}; + +template +void QDeclarativeGuard::addGuard() +{ + if (QObjectPrivate::get(o)->wasDeleted) { + if (prev) remGuard(); + return; + } + + QDeclarativeData *data = QDeclarativeData::get(o, true); + next = data->guards; + if (next) reinterpret_cast *>(next)->prev = &next; + data->guards = reinterpret_cast *>(this); + prev = &data->guards; +} + +template +void QDeclarativeGuard::remGuard() +{ + if (next) reinterpret_cast *>(next)->prev = prev; + *prev = next; + next = 0; + prev = 0; +} + +QT_END_NAMESPACE + +#endif // QDECLARATIVEDATA_P_H diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h deleted file mode 100644 index fdc51a4..0000000 --- a/src/declarative/qml/qdeclarativedeclarativedata_p.h +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEDECLARATIVEDATA_P_H -#define QDECLARATIVEDECLARATIVEDATA_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include "private/qdeclarativeguard_p.h" - -QT_BEGIN_NAMESPACE - -class QDeclarativeCompiledData; -class QDeclarativeAbstractBinding; -class QDeclarativeContext; -class QDeclarativePropertyCache; -class QDeclarativeContextData; -// This class is structured in such a way, that simply zero'ing it is the -// default state for elemental object allocations. This is crucial in the -// workings of the QDeclarativeInstruction::CreateSimpleObject instruction. -// Don't change anything here without first considering that case! -class Q_AUTOTEST_EXPORT QDeclarativeDeclarativeData : public QAbstractDeclarativeData -{ -public: - QDeclarativeDeclarativeData() - : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), - context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), - bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), - attachedProperties(0), scriptValue(0), propertyCache(0), guards(0) { - init(); - } - - static inline void init() { - QAbstractDeclarativeData::destroyed = destroyed; - QAbstractDeclarativeData::parentChanged = parentChanged; - } - - static void destroyed(QAbstractDeclarativeData *, QObject *); - static void parentChanged(QAbstractDeclarativeData *, QObject *, QObject *); - - void destroyed(QObject *); - void parentChanged(QObject *, QObject *); - - void setImplicitDestructible() { - if (!explicitIndestructibleSet) indestructible = false; - } - - quint32 ownMemory:1; - quint32 ownContext:1; - quint32 indestructible:1; - quint32 explicitIndestructibleSet:1; - quint32 dummy:28; - - QDeclarativeContextData *context; - QDeclarativeContextData *outerContext; - - QDeclarativeAbstractBinding *bindings; - - // Linked list for QDeclarativeContext::contextObjects - QDeclarativeDeclarativeData *nextContextObject; - QDeclarativeDeclarativeData**prevContextObject; - - int bindingBitsSize; - quint32 *bindingBits; - bool hasBindingBit(int) const; - void clearBindingBit(int); - void setBindingBit(QObject *obj, int); - - ushort lineNumber; - ushort columnNumber; - - QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context? - unsigned int deferredIdx; - - QHash *attachedProperties; - - // ### Can we make this QScriptValuePrivate so we incur no additional allocation - // cost? - QScriptValue *scriptValue; - QDeclarativePropertyCache *propertyCache; - - QDeclarativeGuard *guards; - - static QDeclarativeDeclarativeData *get(const QObject *object, bool create = false) { - QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); - if (priv->wasDeleted) { - Q_ASSERT(!create); - return 0; - } else if (priv->declarativeData) { - return static_cast(priv->declarativeData); - } else if (create) { - priv->declarativeData = new QDeclarativeDeclarativeData; - return static_cast(priv->declarativeData); - } else { - return 0; - } - } -}; - -template -void QDeclarativeGuard::addGuard() -{ - if (QObjectPrivate::get(o)->wasDeleted) { - if (prev) remGuard(); - return; - } - - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(o, true); - next = data->guards; - if (next) reinterpret_cast *>(next)->prev = &next; - data->guards = reinterpret_cast *>(this); - prev = &data->guards; -} - -template -void QDeclarativeGuard::remGuard() -{ - if (next) reinterpret_cast *>(next)->prev = prev; - *prev = next; - next = 0; - prev = 0; -} - -QT_END_NAMESPACE - -#endif // QDECLARATIVEDECLARATIVEDATA_P_H diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index eb149b1..ae0929b 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -354,14 +354,14 @@ void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *) { } -void QDeclarativeDeclarativeData::destroyed(QAbstractDeclarativeData *d, QObject *o) +void QDeclarativeData::destroyed(QAbstractDeclarativeData *d, QObject *o) { - static_cast(d)->destroyed(o); + static_cast(d)->destroyed(o); } -void QDeclarativeDeclarativeData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QObject *p) +void QDeclarativeData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QObject *p) { - static_cast(d)->parentChanged(o, p); + static_cast(d)->parentChanged(o, p); } void QDeclarativeEnginePrivate::init() @@ -371,7 +371,7 @@ void QDeclarativeEnginePrivate::init() qRegisterMetaType("QDeclarativeScriptString"); qRegisterMetaType("QScriptValue"); - QDeclarativeDeclarativeData::init(); + QDeclarativeData::init(); contextClass = new QDeclarativeContextScriptClass(q); objectClass = new QDeclarativeObjectScriptClass(q); @@ -663,8 +663,8 @@ QDeclarativeContext *QDeclarativeEngine::contextForObject(const QObject *object) QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); - QDeclarativeDeclarativeData *data = - static_cast(priv->declarativeData); + QDeclarativeData *data = + static_cast(priv->declarativeData); if (!data) return 0; @@ -687,7 +687,7 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex if (!object || !context) return; - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, true); + QDeclarativeData *data = QDeclarativeData::get(object, true); if (data->context) { qWarning("QDeclarativeEngine::setContextForObject(): Object already has a QDeclarativeContext"); return; @@ -738,7 +738,7 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex */ void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership ownership) { - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, true); + QDeclarativeData *ddata = QDeclarativeData::get(object, true); if (!ddata) return; @@ -751,7 +751,7 @@ void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership own */ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject *object) { - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, false); + QDeclarativeData *ddata = QDeclarativeData::get(object, false); if (!ddata) return CppOwnership; else @@ -760,7 +760,7 @@ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject void qmlExecuteDeferred(QObject *object) { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object); + QDeclarativeData *data = QDeclarativeData::get(object); if (data && data->deferredComponent) { @@ -793,7 +793,7 @@ QDeclarativeEngine *qmlEngine(const QObject *obj) QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create) { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object); + QDeclarativeData *data = QDeclarativeData::get(object); if (!data) return 0; // Attached properties are only on objects created by QML @@ -828,7 +828,7 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, return qmlAttachedPropertiesObjectById(*idCache, object, create); } -void QDeclarativeDeclarativeData::destroyed(QObject *object) +void QDeclarativeData::destroyed(QObject *object) { if (deferredComponent) deferredComponent->release(); @@ -875,12 +875,12 @@ void QDeclarativeDeclarativeData::destroyed(QObject *object) delete this; } -void QDeclarativeDeclarativeData::parentChanged(QObject *, QObject *parent) +void QDeclarativeData::parentChanged(QObject *, QObject *parent) { if (!parent && scriptValue) { delete scriptValue; scriptValue = 0; } } -bool QDeclarativeDeclarativeData::hasBindingBit(int bit) const +bool QDeclarativeData::hasBindingBit(int bit) const { if (bindingBitsSize > bit) return bindingBits[bit / 32] & (1 << (bit % 32)); @@ -888,13 +888,13 @@ bool QDeclarativeDeclarativeData::hasBindingBit(int bit) const return false; } -void QDeclarativeDeclarativeData::clearBindingBit(int bit) +void QDeclarativeData::clearBindingBit(int bit) { if (bindingBitsSize > bit) bindingBits[bit / 32] &= ~(1 << (bit % 32)); } -void QDeclarativeDeclarativeData::setBindingBit(QObject *obj, int bit) +void QDeclarativeData::setBindingBit(QObject *obj, int bit) { if (bindingBitsSize <= bit) { int props = obj->metaObject()->propertyCount(); @@ -960,7 +960,7 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS QUrl url = QUrl(context->resolvedUrl(QUrl(arg))); QDeclarativeComponent *c = new QDeclarativeComponent(activeEngine, url, activeEngine); QDeclarativeComponentPrivate::get(c)->creationContext = context; - QDeclarativeDeclarativeData::get(c, true)->setImplicitDestructible(); + QDeclarativeData::get(c, true)->setImplicitDestructible(); return activeEnginePriv->objectClass->newQObject(c, qMetaTypeId()); } } @@ -1031,7 +1031,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS if(gobj && gparent) gobj->setParentItem(gparent); - QDeclarativeDeclarativeData::get(obj, true)->setImplicitDestructible(); + QDeclarativeData::get(obj, true)->setImplicitDestructible(); return activeEnginePriv->objectClass->newQObject(obj, QMetaType::QObjectStar); } diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 3455883..578733c 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -264,7 +264,7 @@ void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDecla QDeclarativeEngineDebugServer::QDeclarativeObjectData QDeclarativeEngineDebugServer::objectData(QObject *object) { - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object); + QDeclarativeData *ddata = QDeclarativeData::get(object); QDeclarativeObjectData rv; if (ddata && ddata->outerContext) { rv.url = ddata->outerContext->url; diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h index 747d58f..be60ce4 100644 --- a/src/declarative/qml/qdeclarativeguard_p.h +++ b/src/declarative/qml/qdeclarativeguard_p.h @@ -65,7 +65,7 @@ class QDeclarativeGuard QObject *o; QDeclarativeGuard *next; QDeclarativeGuard **prev; - friend class QDeclarativeDeclarativeData; + friend class QDeclarativeData; public: inline QDeclarativeGuard(); inline QDeclarativeGuard(T *); @@ -99,7 +99,7 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QDeclarativeGuard); -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" QT_BEGIN_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp index 6199aa9..0a4352f 100644 --- a/src/declarative/qml/qdeclarativeinfo.cpp +++ b/src/declarative/qml/qdeclarativeinfo.cpp @@ -41,7 +41,7 @@ #include "qdeclarativeinfo.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "qdeclarativecontext.h" #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativemetatype_p.h" @@ -100,7 +100,7 @@ QDeclarativeInfo::QDeclarativeInfo(const QObject *object) pos += typeName; } - QDeclarativeDeclarativeData *ddata = object?QDeclarativeDeclarativeData::get(object):0; + QDeclarativeData *ddata = object?QDeclarativeData::get(object):0; pos += QLatin1String(" ("); if (ddata) { if (ddata->outerContext && !ddata->outerContext->url.isEmpty()) { diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index e1e33ab..5773fe6 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -43,7 +43,7 @@ #include "private/qdeclarativeengine_p.h" #include "private/qdeclarativecontext_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "private/qdeclarativetypenamescriptclass_p.h" #include "private/qdeclarativelistscriptclass_p.h" #include "private/qdeclarativebinding_p.h" @@ -63,7 +63,7 @@ struct ObjectData : public QScriptDeclarativeClass::Object { virtual ~ObjectData() { if (object && !object->parent()) { - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, false); + QDeclarativeData *ddata = QDeclarativeData::get(object, false); if (ddata && !ddata->indestructible) object->deleteLater(); } @@ -104,7 +104,7 @@ QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type if (QObjectPrivate::get(object)->wasDeleted) return scriptEngine->undefinedValue(); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, true); + QDeclarativeData *ddata = QDeclarativeData::get(object, true); if (!ddata) { return scriptEngine->undefinedValue(); @@ -428,7 +428,7 @@ QScriptValue QDeclarativeObjectScriptClass::destroy(QScriptContext *context, QSc if (!data->object) return engine->undefinedValue(); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(data->object, false); + QDeclarativeData *ddata = QDeclarativeData::get(data->object, false); if (!ddata || ddata->indestructible) return engine->currentContext()->throwError(QLatin1String("Invalid attempt to destroy() an indestructible object")); @@ -453,7 +453,7 @@ QStringList QDeclarativeObjectScriptClass::propertyNames(Object *object) QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine); QDeclarativePropertyCache *cache = 0; - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj); + QDeclarativeData *ddata = QDeclarativeData::get(obj); if (ddata) cache = ddata->propertyCache; if (!cache) { @@ -752,7 +752,7 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e) return QScriptDeclarativeClass::Value(engine, *((QString *)&data)); } else if (type == QMetaType::QObjectStar) { QObject *object = *((QObject **)&data); - QDeclarativeDeclarativeData::get(object, true)->setImplicitDestructible(); + QDeclarativeData::get(object, true)->setImplicitDestructible(); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e); return QScriptDeclarativeClass::Value(engine, priv->objectClass->newQObject(object)); } else if (type == qMetaTypeId >()) { @@ -761,7 +761,7 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e) QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e); for (int ii = 0; ii < list.count(); ++ii) { QObject *object = list.at(ii); - QDeclarativeDeclarativeData::get(object, true)->setImplicitDestructible(); + QDeclarativeData::get(object, true)->setImplicitDestructible(); rv.setProperty(ii, priv->objectClass->newQObject(object)); } return QScriptDeclarativeClass::Value(engine, rv); diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index affb6b9..9cb2416 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -50,7 +50,7 @@ #include "private/qdeclarativeboundsignal_p.h" #include "qdeclarativeengine.h" #include "private/qdeclarativeengine_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qdeclarativelist_p.h" #include "private/qdeclarativecompiler_p.h" @@ -606,7 +606,7 @@ QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) if (!that.isProperty() || !that.d->object) return 0; - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(that.d->object); + QDeclarativeData *data = QDeclarativeData::get(that.d->object); if (!data) return 0; @@ -660,7 +660,7 @@ QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::setBinding(QObject *object, int coreIndex, int valueTypeIndex, QDeclarativeAbstractBinding *newBinding, WriteFlags flags) { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, 0 != newBinding); + QDeclarativeData *data = QDeclarativeData::get(object, 0 != newBinding); QDeclarativeAbstractBinding *binding = 0; if (data && data->hasBindingBit(coreIndex)) { diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 111259d..4b4b142 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -368,7 +368,7 @@ QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine); QDeclarativePropertyCache *cache = 0; - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj); + QDeclarativeData *ddata = QDeclarativeData::get(obj); if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine) cache = ddata->propertyCache; if (!cache) { @@ -400,7 +400,7 @@ QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine); QDeclarativePropertyCache *cache = 0; - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj); + QDeclarativeData *ddata = QDeclarativeData::get(obj); if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine) cache = ddata->propertyCache; if (!cache) { diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index 3575c17..fdcbeee 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -45,7 +45,7 @@ #include "private/qdeclarativeboundsignal_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qmetaobjectbuilder_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "qdeclarative.h" #include "private/qdeclarativecustomparser_p.h" #include "qdeclarativeengine.h" @@ -112,7 +112,7 @@ QObject *QDeclarativeVME::run(QDeclarativeContextData *ctxt, QDeclarativeCompile void QDeclarativeVME::runDeferred(QObject *object) { - QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object); + QDeclarativeData *data = QDeclarativeData::get(object); if (!data || !data->context || !data->deferredComponent) return; @@ -194,7 +194,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create object of type %1").arg(QString::fromLatin1(types.at(instr.create.type).className))); } - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(o); + QDeclarativeData *ddata = QDeclarativeData::get(o); Q_ASSERT(ddata); if (stack.isEmpty()) { @@ -245,12 +245,12 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, case QDeclarativeInstruction::CreateSimpleObject: { QObject *o = (QObject *)operator new(instr.createSimple.typeSize + - sizeof(QDeclarativeDeclarativeData)); - ::memset(o, 0, instr.createSimple.typeSize + sizeof(QDeclarativeDeclarativeData)); + sizeof(QDeclarativeData)); + ::memset(o, 0, instr.createSimple.typeSize + sizeof(QDeclarativeData)); instr.createSimple.create(o); - QDeclarativeDeclarativeData *ddata = - (QDeclarativeDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize); + QDeclarativeData *ddata = + (QDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize); ddata->lineNumber = instr.line; ddata->columnNumber = instr.createSimple.column; @@ -289,7 +289,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, new QDeclarativeComponent(ctxt->engine, comp, ii + 1, instr.createComponent.count, stack.isEmpty() ? 0 : stack.top()); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(qcomp, true); + QDeclarativeData *ddata = QDeclarativeData::get(qcomp, true); Q_ASSERT(ddata); ctxt->addObject(qcomp); @@ -322,7 +322,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, (void)new QDeclarativeVMEMetaObject(target, &mo, data, comp); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(target, true); + QDeclarativeData *ddata = QDeclarativeData::get(target, true); if (ddata->propertyCache) ddata->propertyCache->release(); ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache); ddata->propertyCache->addref(); @@ -854,8 +854,8 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, { if (instr.defer.deferCount) { QObject *target = stack.top(); - QDeclarativeDeclarativeData *data = - QDeclarativeDeclarativeData::get(target, true); + QDeclarativeData *data = + QDeclarativeData::get(target, true); comp->addref(); data->deferredComponent = comp; data->deferredIdx = ii; @@ -935,8 +935,8 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData QObject *rv = 0; void *memory = 0; - type->create(&rv, &memory, sizeof(QDeclarativeDeclarativeData)); - QDeclarativeDeclarativeData *ddata = new (memory) QDeclarativeDeclarativeData; + type->create(&rv, &memory, sizeof(QDeclarativeData)); + QDeclarativeData *ddata = new (memory) QDeclarativeData; ddata->ownMemory = false; QObjectPrivate::get(rv)->declarativeData = ddata; diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp index 2e2a8e8..c4d47b3 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject.cpp +++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp @@ -379,7 +379,7 @@ QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj, const QMetaObject *other, const QDeclarativeVMEMetaData *meta, QDeclarativeCompiledData *cdata) -: object(obj), compiledData(cdata), ctxt(QDeclarativeDeclarativeData::get(obj)->outerContext), +: object(obj), compiledData(cdata), ctxt(QDeclarativeData::get(obj)->outerContext), metaData(meta), data(0), methods(0), parent(0) { compiledData->addref(); diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index 1087f44..c48662c 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -94,7 +94,7 @@ HEADERS += \ $$PWD/qdeclarativecompositetypemanager_p.h \ $$PWD/qdeclarativelist.h \ $$PWD/qdeclarativelist_p.h \ - $$PWD/qdeclarativedeclarativedata_p.h \ + $$PWD/qdeclarativedata_p.h \ $$PWD/qdeclarativeerror.h \ $$PWD/qdeclarativescriptparser_p.h \ $$PWD/qdeclarativeenginedebug_p.h \ diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index fac38d7..7e20428 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -777,7 +777,7 @@ void QDeclarativeScriptActionPrivate::execute() const QString &str = scriptStr.script(); if (!str.isEmpty()) { QDeclarativeExpression expr(scriptStr.context(), str, scriptStr.scopeObject()); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(q); + QDeclarativeData *ddata = QDeclarativeData::get(q); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); expr.value(); diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index 3c0a086..d91b107 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -41,7 +41,7 @@ #include "private/qdeclarativelistmodelworkeragent_p.h" #include "private/qdeclarativelistmodel_p_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include "private/qdeclarativeengine_p.h" #include "qdeclarativeinfo.h" diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp index 3d95125..0e5aaa6 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject.cpp +++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp @@ -41,7 +41,7 @@ #include "private/qdeclarativeopenmetaobject_p.h" #include "private/qdeclarativepropertycache_p.h" -#include "private/qdeclarativedeclarativedata_p.h" +#include "private/qdeclarativedata_p.h" #include #include @@ -302,7 +302,7 @@ void QDeclarativeOpenMetaObject::setCached(bool c) d->cacheProperties = c; - QDeclarativeDeclarativeData *qmldata = QDeclarativeDeclarativeData::get(d->object, true); + QDeclarativeData *qmldata = QDeclarativeData::get(d->object, true); if (d->cacheProperties) { if (!d->type->d->cache) d->type->d->cache = QDeclarativePropertyCache::create(d->type->d->engine, this); diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 0521d27..3854b10 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -572,7 +572,7 @@ void QDeclarativeStateChangeScript::execute() const QString &script = d->script.script(); if (!script.isEmpty()) { QDeclarativeExpression expr(d->script.context(), script, d->script.scopeObject()); - QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(this); + QDeclarativeData *ddata = QDeclarativeData::get(this); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); expr.value(); -- cgit v0.12