diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-06 16:55:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 15:33:19 +0100 |
commit | 99efe4309379482fce5c231885883e359bf85290 (patch) | |
tree | dbb9333a547fa1939bd63bd64136611e9fe82968 /src/quick/util/qquickpropertychanges.cpp | |
parent | 9fc17c08e5635cf112c6194e6c24af2a9c7caf00 (diff) |
Remove old compiler and VME
This removes the bulk of the code. A few smaller cleanups remain, to be
done in smaller changes as they move code around.
Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData,
which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not
do anything and the class is gone now :)
Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/util/qquickpropertychanges.cpp')
-rw-r--r-- | src/quick/util/qquickpropertychanges.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp index 916a605999..6ff98b8582 100644 --- a/src/quick/util/qquickpropertychanges.cpp +++ b/src/quick/util/qquickpropertychanges.cpp @@ -236,34 +236,6 @@ public: QQmlProperty property(const QString &); }; -void -QQuickPropertyChangesParser::compileList(QList<QPair<QString, QVariant> > &list, - const QString &pre, - const QQmlCustomParserProperty &prop) -{ - QString propName = pre + prop.name(); - - QList<QVariant> values = prop.assignedValues(); - for (int ii = 0; ii < values.count(); ++ii) { - const QVariant &value = values.at(ii); - - if (value.userType() == qMetaTypeId<QQmlCustomParserNode>()) { - error(qvariant_cast<QQmlCustomParserNode>(value), - QQuickPropertyChanges::tr("PropertyChanges does not support creating state-specific objects.")); - continue; - } else if(value.userType() == qMetaTypeId<QQmlCustomParserProperty>()) { - - QQmlCustomParserProperty prop = - qvariant_cast<QQmlCustomParserProperty>(value); - QString pre = propName + QLatin1Char('.'); - compileList(list, pre, prop); - - } else { - list << qMakePair(propName, value); - } - } -} - void QQuickPropertyChangesParser::compileList(QList<QPair<QString, const QV4::CompiledData::Binding*> > &list, const QString &pre, const QV4::CompiledData::QmlUnit *qmlUnit, const QV4::CompiledData::Binding *binding) { QString propName = pre + qmlUnit->header.stringAt(binding->propertyNameIndex); @@ -287,50 +259,6 @@ void QQuickPropertyChangesParser::compileList(QList<QPair<QString, const QV4::Co list << qMakePair(propName, binding); } -QByteArray -QQuickPropertyChangesParser::compile(const QList<QQmlCustomParserProperty> &props) -{ - QList<QPair<QString, QVariant> > data; - for(int ii = 0; ii < props.count(); ++ii) - compileList(data, QString(), props.at(ii)); - - QByteArray rv; - QDataStream ds(&rv, QIODevice::WriteOnly); - - ds << data.count(); - for(int ii = 0; ii < data.count(); ++ii) { - QQmlScript::Variant v = qvariant_cast<QQmlScript::Variant>(data.at(ii).second); - QVariant var; - bool isScript = v.isScript(); - QQmlBinding::Identifier id = 0; - switch(v.type()) { - case QQmlScript::Variant::Boolean: - var = QVariant(v.asBoolean()); - break; - case QQmlScript::Variant::Number: - var = QVariant(v.asNumber()); - break; - case QQmlScript::Variant::String: - var = QVariant(v.asString()); - break; - case QQmlScript::Variant::Invalid: - case QQmlScript::Variant::Script: - var = QVariant(v.asScript()); - { - // Pre-rewrite the expression - id = bindingIdentifier(v, data.at(ii).first); - } - break; - } - - ds << data.at(ii).first << isScript << var; - if (isScript) - ds << id; - } - - return rv; -} - QByteArray QQuickPropertyChangesParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &props) { Q_UNUSED(objectIndex) |