diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-01 08:51:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-03 14:38:16 +0100 |
commit | 483cafccea0f1dabe89db6615da8bfbe4250e2b6 (patch) | |
tree | e5b37ce0d04261c7f1e5a3329be4c9a7b42e32e8 /src/qml/compiler/qqmltypecompiler.cpp | |
parent | 82d2670d8c05e4bc6ed34bf3b8c3dd1a5d133e96 (diff) |
[new compiler] Fix error message about final property overrides
Change-Id: Icb8c2dfc633a6c322d4448ce18e3c01e0311b0f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler.cpp')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 8c76aa2a9e..99bd94ed38 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -526,18 +526,19 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QtQml::Qm int aliasCount = 0; int varPropCount = 0; + PropertyResolver resolver(baseTypeCache); + for (const QtQml::QmlProperty *p = obj->firstProperty(); p; p = p->next) { if (p->type == QV4::CompiledData::Property::Alias) aliasCount++; else if (p->type == QV4::CompiledData::Property::Var) varPropCount++; -#if 0 // ### Do this elsewhere // No point doing this for both the alias and non alias cases - QQmlPropertyData *d = property(obj, p->name); + bool notInRevision = false; + QQmlPropertyData *d = resolver.property(stringAt(p->nameIndex), ¬InRevision); if (d && d->isFinal()) COMPILE_EXCEPTION(p, tr("Cannot override FINAL property")); -#endif } typedef QQmlVMEMetaData VMD; |