diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-24 18:21:15 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-25 10:51:47 +0100 |
commit | 3f0c9122c5971090d0256bda4e9fb53da4a76ea0 (patch) | |
tree | ca51902e6fb457e61da574d55ebee72d7a28ca7a /src/qml/inlinecomponentutils_p.h | |
parent | d9eeab6e2c699761115d9acbca292c16762eb8f3 (diff) |
Encapsulate QV4::ResolvedTypeReference
It's used all over the place. We need a proper interface.
Change-Id: Iebe254ef3bf35503bf3fdd3639979a5db2b3449e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/inlinecomponentutils_p.h')
-rw-r--r-- | src/qml/inlinecomponentutils_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/inlinecomponentutils_p.h b/src/qml/inlinecomponentutils_p.h index 99b28349cd..ae436d53b0 100644 --- a/src/qml/inlinecomponentutils_p.h +++ b/src/qml/inlinecomponentutils_p.h @@ -51,7 +51,7 @@ // #include <private/qv4compileddata_p.h> -#include <private/qv4executablecompilationunit_p.h> +#include <private/qv4resolvedtypereference_p.h> namespace icutils { struct Node { @@ -88,10 +88,12 @@ void fillAdjacencyListForInlineComponents(ObjectContainer *objectContainer, Adja const CompiledObject *obj = objectContainer->objectAt(ic.objectIndex); QV4::ResolvedTypeReference *currentICTypeRef = objectContainer->resolvedType(ic.nameIndex); auto createEdgeFromTypeRef = [&](QV4::ResolvedTypeReference *targetTypeRef) { - if (targetTypeRef && targetTypeRef->type.isInlineComponentType()) { - if (targetTypeRef->type.containingType() == currentICTypeRef->type.containingType()) { + if (targetTypeRef) { + const auto targetType = targetTypeRef->type(); + if (targetType.isInlineComponentType() + && targetType.containingType() == currentICTypeRef->type().containingType()) { auto icIt = std::find_if(allICs.cbegin(), allICs.cend(), [&](const QV4::CompiledData::InlineComponent &icSearched){ - return int(icSearched.objectIndex) == targetTypeRef->type.inlineComponentObjectId(); + return int(icSearched.objectIndex) == targetType.inlineComponentObjectId(); }); Q_ASSERT(icIt != allICs.cend()); Node& target = nodes[i]; |