diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-09-16 16:11:34 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-09-21 19:59:23 +0000 |
commit | ba7edffda3f360955825c3ef886ec232c0b2022b (patch) | |
tree | f4c2aabf67edc23eaf03e006ad768ebeae2544c7 /src/qml/compiler | |
parent | 0f29340a10b9638666ded939b4f6bf3d891f1320 (diff) |
Remove some dead code
Also get rid of the unnecessary QQmlCustomCompilerBackend interface.
Change-Id: I6cfdd88ef49d3d314d07aa069da481d304e7a285
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 15 | ||||
-rw-r--r-- | src/qml/compiler/qqmltypecompiler_p.h | 6 |
2 files changed, 4 insertions, 17 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 80ffafda72..7f62446c22 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -1719,17 +1719,6 @@ const QQmlImports &QQmlPropertyValidator::imports() const return *compiler->imports(); } -QString QQmlPropertyValidator::bindingAsString(int objectIndex, const QV4::CompiledData::Binding *binding) const -{ - const QmlIR::Object *object = compiler->qmlObjects()->value(objectIndex); - if (!object) - return QString(); - int reverseIndex = object->runtimeFunctionIndices->indexOf(binding->value.compiledScriptIndex); - if (reverseIndex == -1) - return QString(); - return compiler->bindingAsString(object, reverseIndex); -} - typedef QVarLengthArray<const QV4::CompiledData::Binding *, 8> GroupPropertyVector; struct BindingFinder @@ -1998,10 +1987,10 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD if (customParser && !customBindings.isEmpty()) { customParser->clearErrors(); - customParser->compiler = this; + customParser->validator = this; customParser->imports = compiler->imports(); customParser->verifyBindings(qmlUnit, customBindings); - customParser->compiler = 0; + customParser->validator = 0; customParser->imports = (QQmlImports*)0; customParserBindingsPerObject->insert(objectIndex, customParserBindings); const QList<QQmlError> parserErrors = customParser->errors(); diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 75987af656..cbc68280b7 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -264,7 +264,7 @@ protected: QHash<int, QHash<int, int> > *objectIndexToIdPerComponent; }; -class QQmlPropertyValidator : public QQmlCompilePass, public QQmlCustomParserCompilerBackend +class QQmlPropertyValidator : public QQmlCompilePass { Q_DECLARE_TR_FUNCTIONS(QQmlPropertyValidator) public: @@ -272,9 +272,7 @@ public: bool validate(); - // Re-implemented for QQmlCustomParser - virtual const QQmlImports &imports() const; - virtual QString bindingAsString(int objectIndex, const QV4::CompiledData::Binding *binding) const; + const QQmlImports &imports() const; private: bool validateObject(int objectIndex, const QV4::CompiledData::Binding *instantiatingBinding, bool populatingValueTypeGroupProperty = false) const; |