get rid of QBitField and QDeclarativeDom

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-08-07 22:27:26 +00:00
parent d2c6af0269
commit b2314306e9
10 changed files with 16 additions and 2562 deletions

View file

@ -1,165 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** 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 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QBITFIELD_P_H
#define QBITFIELD_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 <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
class QBitField
{
public:
inline QBitField();
inline QBitField(const quint32 *, int bits);
inline QBitField(const QBitField &);
inline ~QBitField();
inline QBitField &operator=(const QBitField &);
inline quint32 size() const;
inline QBitField united(const QBitField &);
inline bool testBit(int) const;
private:
quint32 bits:31;
quint32 *ownData;
const quint32 *data;
};
QBitField::QBitField()
: bits(0), ownData(0), data(0)
{
}
QBitField::QBitField(const quint32 *bitData, int bitCount)
: bits((quint32)bitCount), ownData(0), data(bitData)
{
}
QBitField::QBitField(const QBitField &other)
: bits(other.bits), ownData(other.ownData), data(other.data)
{
if (ownData)
++(*ownData);
}
QBitField::~QBitField()
{
if (ownData)
if(0 == --(*ownData)) delete [] ownData;
}
QBitField &QBitField::operator=(const QBitField &other)
{
if (other.data == data)
return *this;
if (ownData)
if(0 == --(*ownData)) delete [] ownData;
bits = other.bits;
ownData = other.ownData;
data = other.data;
if (ownData)
++(*ownData);
return *this;
}
inline quint32 QBitField::size() const
{
return bits;
}
QBitField QBitField::united(const QBitField &o)
{
if (o.bits == 0) {
return *this;
} else if (bits == 0) {
return o;
} else {
int max = (bits > o.bits)?bits:o.bits;
int length = (max + 31) / 32;
QBitField rv;
rv.bits = max;
rv.ownData = new quint32[length + 1];
*(rv.ownData) = 1;
rv.data = rv.ownData + 1;
if (bits > o.bits) {
::memcpy((quint32 *)rv.data, data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (o.bits + quint32(31)) / 32; ++ii)
((quint32 *)rv.data)[ii] |= o.data[ii];
} else {
::memcpy((quint32 *)rv.data, o.data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (bits + quint32(31)) / 32; ++ii)
((quint32 *)rv.data)[ii] |= data[ii];
}
return rv;
}
}
bool QBitField::testBit(int b) const
{
Q_ASSERT(b >= 0);
if ((quint32)b < bits) {
return data[b / 32] & (1 << (b % 32));
} else {
return false;
}
}
QT_END_NAMESPACE
#endif // QBITFIELD_P_H

View file

@ -58,7 +58,6 @@
#include "qdeclarativeinstruction_p.h"
#include "qdeclarativeparser_p.h"
#include "qdeclarativeengine_p.h"
#include "qbitfield_p.h"
#include "qdeclarativepropertycache_p.h"
#include "qdeclarativeintegercache_p.h"
#include "qdeclarativetypenamecache_p.h"
@ -96,7 +95,7 @@ public:
QDeclarativePropertyCache *typePropertyCache;
QDeclarativeCompiledData *component;
QObject *createInstance(QDeclarativeContextData *, const QBitField &, QList<QDeclarativeError> *) const;
QObject *createInstance(QDeclarativeContextData *, QList<QDeclarativeError> *) const;
const QMetaObject *metaObject() const;
QDeclarativePropertyCache *propertyCache() const;
QDeclarativePropertyCache *createPropertyCache(QDeclarativeEngine *);

View file

@ -761,7 +761,7 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context)
QObject *QDeclarativeComponent::beginCreate(QDeclarativeContext *context)
{
Q_D(QDeclarativeComponent);
QObject *rv = d->beginCreate(context?QDeclarativeContextData::get(context):0, QBitField());
QObject *rv = d->beginCreate(context ? QDeclarativeContextData::get(context) : 0);
if (rv) {
QDeclarativeData *ddata = QDeclarativeData::get(rv);
Q_ASSERT(ddata);
@ -771,7 +771,7 @@ QObject *QDeclarativeComponent::beginCreate(QDeclarativeContext *context)
}
QObject *
QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, const QBitField &bindings)
QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context)
{
Q_Q(QDeclarativeComponent);
if (!context) {
@ -799,14 +799,13 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
return 0;
}
return begin(context, creationContext, cc, start, count, &state, 0, bindings);
return begin(context, creationContext, cc, start, count, &state, 0);
}
QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentContext,
QDeclarativeContextData *componentCreationContext,
QDeclarativeCompiledData *component, int start, int count,
ConstructionState *state, QList<QDeclarativeError> *errors,
const QBitField &bindings)
ConstructionState *state, QList<QDeclarativeError> *errors)
{
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(parentContext->engine);
bool isRoot = !enginePriv->inBeginCreate;
@ -829,7 +828,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon
enginePriv->inBeginCreate = true;
QDeclarativeVME vme;
QObject *rv = vme.run(ctxt, component, start, count, bindings);
QObject *rv = vme.run(ctxt, component, start, count);
if (vme.isError()) {
if(errors) *errors = vme.errors();

View file

@ -57,7 +57,6 @@
#include "qdeclarativeengine_p.h"
#include "qdeclarativetypeloader_p.h"
#include "qbitfield_p.h"
#include "qdeclarativeerror.h"
#include "qdeclarative.h"
@ -81,7 +80,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, pu
public:
QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), engine(0), creationContext(0) {}
QObject *beginCreate(QDeclarativeContextData *, const QBitField &);
QObject *beginCreate(QDeclarativeContextData *);
void completeCreate();
QDeclarativeTypeData *typeData;
@ -110,8 +109,7 @@ public:
static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext,
QDeclarativeCompiledData *component, int start, int count,
ConstructionState *state, QList<QDeclarativeError> *errors,
const QBitField &bindings = QBitField());
ConstructionState *state, QList<QDeclarativeError> *errors);
static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object,
ConstructionState *state);
static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state);

File diff suppressed because it is too large Load diff

View file

@ -1,361 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** 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 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QDECLARATIVEDOM_P_H
#define QDECLARATIVEDOM_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 "qdeclarativeerror.h"
#include <QtCore/qlist.h>
#include <QtCore/qshareddata.h>
#include <qdeclarativeglobal_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class QString;
class QByteArray;
class QDeclarativeDomObject;
class QDeclarativeDomList;
class QDeclarativeDomValue;
class QDeclarativeEngine;
class QDeclarativeDomComponent;
class QDeclarativeDomImport;
class QIODevice;
class QDeclarativeDomDocumentPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDocument
{
public:
QDeclarativeDomDocument();
QDeclarativeDomDocument(const QDeclarativeDomDocument &);
~QDeclarativeDomDocument();
QDeclarativeDomDocument &operator=(const QDeclarativeDomDocument &);
QList<QDeclarativeDomImport> imports() const;
QList<QDeclarativeError> errors() const;
bool load(QDeclarativeEngine *, const QByteArray &, const QUrl & = QUrl());
QDeclarativeDomObject rootObject() const;
private:
QSharedDataPointer<QDeclarativeDomDocumentPrivate> d;
};
class QDeclarativeDomPropertyPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomProperty
{
public:
QDeclarativeDomProperty();
QDeclarativeDomProperty(const QDeclarativeDomProperty &);
~QDeclarativeDomProperty();
QDeclarativeDomProperty &operator=(const QDeclarativeDomProperty &);
bool isValid() const;
QByteArray propertyName() const;
QList<QByteArray> propertyNameParts() const;
bool isDefaultProperty() const;
QDeclarativeDomValue value() const;
int position() const;
int length() const;
private:
friend class QDeclarativeDomObject;
friend class QDeclarativeDomDynamicProperty;
QSharedDataPointer<QDeclarativeDomPropertyPrivate> d;
};
class QDeclarativeDomDynamicPropertyPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDynamicProperty
{
public:
QDeclarativeDomDynamicProperty();
QDeclarativeDomDynamicProperty(const QDeclarativeDomDynamicProperty &);
~QDeclarativeDomDynamicProperty();
QDeclarativeDomDynamicProperty &operator=(const QDeclarativeDomDynamicProperty &);
bool isValid() const;
QByteArray propertyName() const;
int propertyType() const;
QByteArray propertyTypeName() const;
bool isDefaultProperty() const;
QDeclarativeDomProperty defaultValue() const;
bool isAlias() const;
int position() const;
int length() const;
private:
friend class QDeclarativeDomObject;
QSharedDataPointer<QDeclarativeDomDynamicPropertyPrivate> d;
};
class QDeclarativeDomObjectPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomObject
{
public:
QDeclarativeDomObject();
QDeclarativeDomObject(const QDeclarativeDomObject &);
~QDeclarativeDomObject();
QDeclarativeDomObject &operator=(const QDeclarativeDomObject &);
bool isValid() const;
QByteArray objectType() const;
QByteArray objectClassName() const;
int objectTypeMajorVersion() const;
int objectTypeMinorVersion() const;
QString objectId() const;
QList<QDeclarativeDomProperty> properties() const;
QDeclarativeDomProperty property(const QByteArray &) const;
QList<QDeclarativeDomDynamicProperty> dynamicProperties() const;
QDeclarativeDomDynamicProperty dynamicProperty(const QByteArray &) const;
bool isCustomType() const;
QByteArray customTypeData() const;
bool isComponent() const;
QDeclarativeDomComponent toComponent() const;
int position() const;
int length() const;
QUrl url() const;
private:
friend class QDeclarativeDomDocument;
friend class QDeclarativeDomComponent;
friend class QDeclarativeDomValue;
friend class QDeclarativeDomValueValueSource;
friend class QDeclarativeDomValueValueInterceptor;
QSharedDataPointer<QDeclarativeDomObjectPrivate> d;
};
class QDeclarativeDomValuePrivate;
class QDeclarativeDomBasicValuePrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueLiteral
{
public:
QDeclarativeDomValueLiteral();
QDeclarativeDomValueLiteral(const QDeclarativeDomValueLiteral &);
~QDeclarativeDomValueLiteral();
QDeclarativeDomValueLiteral &operator=(const QDeclarativeDomValueLiteral &);
QString literal() const;
private:
friend class QDeclarativeDomValue;
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueBinding
{
public:
QDeclarativeDomValueBinding();
QDeclarativeDomValueBinding(const QDeclarativeDomValueBinding &);
~QDeclarativeDomValueBinding();
QDeclarativeDomValueBinding &operator=(const QDeclarativeDomValueBinding &);
QString binding() const;
private:
friend class QDeclarativeDomValue;
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueSource
{
public:
QDeclarativeDomValueValueSource();
QDeclarativeDomValueValueSource(const QDeclarativeDomValueValueSource &);
~QDeclarativeDomValueValueSource();
QDeclarativeDomValueValueSource &operator=(const QDeclarativeDomValueValueSource &);
QDeclarativeDomObject object() const;
private:
friend class QDeclarativeDomValue;
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueInterceptor
{
public:
QDeclarativeDomValueValueInterceptor();
QDeclarativeDomValueValueInterceptor(const QDeclarativeDomValueValueInterceptor &);
~QDeclarativeDomValueValueInterceptor();
QDeclarativeDomValueValueInterceptor &operator=(const QDeclarativeDomValueValueInterceptor &);
QDeclarativeDomObject object() const;
private:
friend class QDeclarativeDomValue;
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
{
public:
QDeclarativeDomComponent();
QDeclarativeDomComponent(const QDeclarativeDomComponent &);
~QDeclarativeDomComponent();
QDeclarativeDomComponent &operator=(const QDeclarativeDomComponent &);
QDeclarativeDomObject componentRoot() const;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValue
{
public:
enum Type {
Invalid,
Literal,
PropertyBinding,
ValueSource,
ValueInterceptor,
Object,
List
};
QDeclarativeDomValue();
QDeclarativeDomValue(const QDeclarativeDomValue &);
~QDeclarativeDomValue();
QDeclarativeDomValue &operator=(const QDeclarativeDomValue &);
Type type() const;
bool isInvalid() const;
bool isLiteral() const;
bool isBinding() const;
bool isValueSource() const;
bool isValueInterceptor() const;
bool isObject() const;
bool isList() const;
QDeclarativeDomValueLiteral toLiteral() const;
QDeclarativeDomValueBinding toBinding() const;
QDeclarativeDomValueValueSource toValueSource() const;
QDeclarativeDomValueValueInterceptor toValueInterceptor() const;
QDeclarativeDomObject toObject() const;
QDeclarativeDomList toList() const;
int position() const;
int length() const;
private:
friend class QDeclarativeDomProperty;
friend class QDeclarativeDomList;
QSharedDataPointer<QDeclarativeDomValuePrivate> d;
};
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomList
{
public:
QDeclarativeDomList();
QDeclarativeDomList(const QDeclarativeDomList &);
~QDeclarativeDomList();
QDeclarativeDomList &operator=(const QDeclarativeDomList &);
QList<QDeclarativeDomValue> values() const;
int position() const;
int length() const;
QList<int> commaPositions() const;
private:
friend class QDeclarativeDomValue;
QSharedDataPointer<QDeclarativeDomValuePrivate> d;
};
class QDeclarativeDomImportPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomImport
{
public:
enum Type { Library, File };
QDeclarativeDomImport();
QDeclarativeDomImport(const QDeclarativeDomImport &);
~QDeclarativeDomImport();
QDeclarativeDomImport &operator=(const QDeclarativeDomImport &);
Type type() const;
QString uri() const;
QString version() const;
QString qualifier() const;
private:
friend class QDeclarativeDomDocument;
QSharedDataPointer<QDeclarativeDomImportPrivate> d;
};
QT_END_NAMESPACE
QT_END_HEADER
#endif // QDECLARATIVEDOM_P_H

View file

@ -1,157 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** 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 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QDECLARATIVEDOM_P_P_H
#define QDECLARATIVEDOM_P_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 "qdeclarativeparser_p.h"
#include <QtCore/QtGlobal>
QT_BEGIN_NAMESPACE
class QDeclarativeDomDocumentPrivate : public QSharedData
{
public:
QDeclarativeDomDocumentPrivate();
QDeclarativeDomDocumentPrivate(const QDeclarativeDomDocumentPrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomDocumentPrivate();
QList<QDeclarativeError> errors;
QList<QDeclarativeDomImport> imports;
QDeclarativeParser::Object *root;
QList<int> automaticSemicolonOffsets;
};
class QDeclarativeDomObjectPrivate : public QSharedData
{
public:
QDeclarativeDomObjectPrivate();
QDeclarativeDomObjectPrivate(const QDeclarativeDomObjectPrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomObjectPrivate();
typedef QList<QPair<QDeclarativeParser::Property *, QByteArray> > Properties;
Properties properties() const;
Properties properties(QDeclarativeParser::Property *) const;
QDeclarativeParser::Object *object;
};
class QDeclarativeDomPropertyPrivate : public QSharedData
{
public:
QDeclarativeDomPropertyPrivate();
QDeclarativeDomPropertyPrivate(const QDeclarativeDomPropertyPrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomPropertyPrivate();
QByteArray propertyName;
QDeclarativeParser::Property *property;
};
class QDeclarativeDomDynamicPropertyPrivate : public QSharedData
{
public:
QDeclarativeDomDynamicPropertyPrivate();
QDeclarativeDomDynamicPropertyPrivate(const QDeclarativeDomDynamicPropertyPrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomDynamicPropertyPrivate();
bool valid;
QDeclarativeParser::Object::DynamicProperty property;
};
class QDeclarativeDomValuePrivate : public QSharedData
{
public:
QDeclarativeDomValuePrivate();
QDeclarativeDomValuePrivate(const QDeclarativeDomValuePrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomValuePrivate();
QDeclarativeParser::Property *property;
QDeclarativeParser::Value *value;
};
class QDeclarativeDomBasicValuePrivate : public QSharedData
{
public:
QDeclarativeDomBasicValuePrivate();
QDeclarativeDomBasicValuePrivate(const QDeclarativeDomBasicValuePrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomBasicValuePrivate();
QDeclarativeParser::Value *value;
};
class QDeclarativeDomImportPrivate : public QSharedData
{
public:
QDeclarativeDomImportPrivate();
QDeclarativeDomImportPrivate(const QDeclarativeDomImportPrivate &o)
: QSharedData(o) { qFatal("Not impl"); }
~QDeclarativeDomImportPrivate();
enum Type { Library, File };
Type type;
QString uri;
QString version;
QString qualifier;
};
QT_END_NAMESPACE
#endif // QDECLARATIVEDOM_P_P_H

View file

@ -123,14 +123,14 @@ struct ListInstance
Q_DECLARE_TYPEINFO(ListInstance, Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE);
QObject *QDeclarativeVME::run(QDeclarativeContextData *ctxt, QDeclarativeCompiledData *comp,
int start, int count, const QBitField &bindingSkipList)
int start, int count)
{
QDeclarativeVMEObjectStack stack;
if (start == -1) start = 0;
if (count == -1) count = comp->bytecode.count();
return run(stack, ctxt, comp, start, count, bindingSkipList);
return run(stack, ctxt, comp, start, count);
}
void QDeclarativeVME::runDeferred(QObject *object)
@ -147,7 +147,7 @@ void QDeclarativeVME::runDeferred(QObject *object)
QDeclarativeVMEObjectStack stack;
stack.push(object);
run(stack, ctxt, comp, start, count, QBitField());
run(stack, ctxt, comp, start, count);
}
inline bool fastHasBinding(QObject *o, int index)
@ -169,8 +169,7 @@ static void removeBindingOnProperty(QObject *o, int index)
QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack,
QDeclarativeContextData *ctxt,
QDeclarativeCompiledData *comp,
int start, int count,
const QBitField &bindingSkipList)
int start, int count)
{
Q_ASSERT(comp);
Q_ASSERT(ctxt);
@ -215,17 +214,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack,
case QDeclarativeInstruction::CreateObject:
{
QBitField bindings;
if (instr.create.bindingBits != -1) {
const QByteArray &bits = datas.at(instr.create.bindingBits);
bindings = QBitField((const quint32*)bits.constData(),
bits.size() * 8);
}
if (stack.isEmpty())
bindings = bindings.united(bindingSkipList);
QObject *o =
types.at(instr.create.type).createInstance(ctxt, bindings, &vmeErrors);
QObject *o = types.at(instr.create.type).createInstance(ctxt, &vmeErrors);
if (!o) {
VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create object of type %1").arg(QString::fromLatin1(types.at(instr.create.type).className)));
@ -767,9 +756,6 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack,
int coreIndex = mp.index();
if ((stack.count() - instr.assignBinding.owner) == 1 && bindingSkipList.testBit(coreIndex))
break;
QDeclarativeBinding *bind = new QDeclarativeBinding((void *)datas.at(instr.assignBinding.value).constData(), comp, context, ctxt, comp->name, instr.line, 0);
bindValues.append(bind);
bind->m_mePtr = &bindValues.values[bindValues.count - 1];
@ -792,8 +778,6 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack,
stack.at(stack.count() - 1 - instr.assignBinding.context);
int property = instr.assignBinding.property;
if (stack.count() == 1 && bindingSkipList.testBit(property & 0xFFFF))
break;
QDeclarativeAbstractBinding *binding =
ctxt->optimizedBindings->configBinding(instr.assignBinding.value, target, scope, property);
@ -1053,7 +1037,6 @@ QList<QDeclarativeError> QDeclarativeVME::errors() const
QObject *
QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData *ctxt,
const QBitField &bindings,
QList<QDeclarativeError> *errors) const
{
if (type) {
@ -1073,7 +1056,7 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData
return rv;
} else {
Q_ASSERT(component);
return QDeclarativeComponentPrivate::begin(ctxt, 0, component, -1, -1, 0, errors, bindings);
return QDeclarativeComponentPrivate::begin(ctxt, 0, component, -1, -1, 0, errors);
}
}

View file

@ -54,7 +54,6 @@
//
#include "qdeclarativeerror.h"
#include "qbitfield_p.h"
#include <QtCore/QString>
#include <QtCore/QStack>
@ -75,8 +74,7 @@ public:
QDeclarativeVME();
QObject *run(QDeclarativeContextData *, QDeclarativeCompiledData *,
int start = -1, int count = -1,
const QBitField & = QBitField());
int start = -1, int count = -1);
void runDeferred(QObject *);
bool isError() const;
@ -85,8 +83,7 @@ public:
private:
QObject *run(QDeclarativeVMEObjectStack &,
QDeclarativeContextData *, QDeclarativeCompiledData *,
int start, int count,
const QBitField &);
int start, int count);
QList<QDeclarativeError> vmeErrors;
};

View file

@ -22,8 +22,6 @@ set(DECLARATIVE_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativeengine_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativeexpression_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativeprivate.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativedom_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativedom_p_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativerefcount_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativemetatype_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativeengine.h
@ -42,7 +40,6 @@ set(DECLARATIVE_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativescriptparser_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativerewrite_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qpodvector_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qbitfield_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativevaluetype_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativecompiledbindings_p.h
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativefastproperties_p.h
@ -104,7 +101,6 @@ set(DECLARATIVE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativecompiler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativecompileddata.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativeboundsignal.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativedom.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativerefcount.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativemetatype.cpp
${CMAKE_CURRENT_SOURCE_DIR}/qml/qdeclarativestringconverters.cpp