diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-05-29 17:53:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-05-30 11:03:36 +0000 |
commit | 7cd4d60c74ed20abead1434fc0b020e46437575e (patch) | |
tree | a5e4a081b34ceff61b38c3d7368dff8dc4c30692 /tests/auto/qml/qqmllanguage/testtypes.cpp | |
parent | d146b955f5be556e155441637c4dbf0920ef892b (diff) |
Removed the dependency to QQmlCompiledData from QQmlCustomParser
We only need fields from the compilation unit, so let's pass that instead.
This is private, internal QQmlEngine API only used by QtQml and QtQuick.
Change-Id: I1a659654d95585b736384b5b519d05a4df3f9ead
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp index cc39422dce..ccfcfc098e 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.cpp +++ b/tests/auto/qml/qqmllanguage/testtypes.cpp @@ -110,11 +110,11 @@ QVariant myCustomVariantTypeConverter(const QString &data) } -void CustomBindingParser::applyBindings(QObject *object, QQmlCompiledData *cdata, const QList<const QV4::CompiledData::Binding *> &bindings) +void CustomBindingParser::applyBindings(QObject *object, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) { CustomBinding *customBinding = qobject_cast<CustomBinding*>(object); Q_ASSERT(customBinding); - customBinding->cdata = cdata; + customBinding->compilationUnit = compilationUnit; customBinding->bindings = bindings; } @@ -123,14 +123,14 @@ void CustomBinding::componentComplete() Q_ASSERT(m_target); foreach (const QV4::CompiledData::Binding *binding, bindings) { - QString name = cdata->compilationUnit->data->stringAt(binding->propertyNameIndex); + QString name = compilationUnit->data->stringAt(binding->propertyNameIndex); int bindingId = binding->value.compiledScriptIndex; QQmlContextData *context = QQmlContextData::get(qmlContext(this)); QV4::Scope scope(QQmlEnginePrivate::getV4Engine(qmlEngine(this))); - QV4::ScopedValue function(scope, QV4::FunctionObject::createQmlFunction(context, m_target, cdata->compilationUnit->runtimeFunctions[bindingId])); + QV4::ScopedValue function(scope, QV4::FunctionObject::createQmlFunction(context, m_target, compilationUnit->runtimeFunctions[bindingId])); QQmlBinding *qmlBinding = new QQmlBinding(function, m_target, context); QQmlProperty property(m_target, name, qmlContext(this)); @@ -169,7 +169,7 @@ void EnumSupportingCustomParser::verifyBindings(const QV4::CompiledData::Unit *q } } -void SimpleObjectCustomParser::applyBindings(QObject *object, QQmlCompiledData *, const QList<const QV4::CompiledData::Binding *> &bindings) +void SimpleObjectCustomParser::applyBindings(QObject *object, QV4::CompiledData::CompilationUnit *, const QList<const QV4::CompiledData::Binding *> &bindings) { SimpleObjectWithCustomParser *o = qobject_cast<SimpleObjectWithCustomParser*>(object); Q_ASSERT(o); |