diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-20 12:21:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-02 14:48:03 +0100 |
commit | 1c509a887a177939556514cd7cd389031d05117c (patch) | |
tree | 4c3694e329a1f6c7416a15924e5c96347ccde510 /src/qml/qml/qqmltypeloader.cpp | |
parent | 8a81380cca802e230011464c9f25c0c1604909d7 (diff) |
[new compiler] When resolving names of attached properties, don't report the error at import time
Instead report it later with a more specific error message. This is consistent with the old compiler.
Change-Id: Iba345b7ecc8a9ff474938f69118665eb0d965594
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 1b947c421a..75f983d9e8 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2414,6 +2414,8 @@ void QQmlTypeData::resolveTypes() TypeReference ref; // resolved reference + const bool reportErrors = unresolvedRef->errorWhenNotFound; + int majorVersion = -1; int minorVersion = -1; QQmlImportNamespace *typeNamespace = 0; @@ -2434,7 +2436,7 @@ void QQmlTypeData::resolveTypes() } } - if (!typeFound || typeNamespace) { + if ((!typeFound || typeNamespace) && reportErrors) { // Known to not be a type: // - known to be a namespace (Namespace {}) // - type with unknown namespace (UnknownNamespace.SomeType {}) @@ -2461,7 +2463,7 @@ void QQmlTypeData::resolveTypes() return; } - if (ref.type->isComposite()) { + if (ref.type && ref.type->isComposite()) { ref.typeData = typeLoader()->getType(ref.type->sourceUrl()); addDependency(ref.typeData); } |