summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-17 10:30:28 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-19 00:29:44 +0000
commitcffa1df6a4de096e95badac757061de0d1744858 (patch)
tree492b1be741e7ffb86fbb026958721e51a8572140
parent13321c15c0d9316ac7ca5c8af0af430d43d8d46d (diff)
Fix lookup of existing inline components by name
Previously this would always return the inline component iwth ID 1. Change-Id: I49dc6eb64fcd8428667f3b22afcb7212aa792db3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7104a3a6f8fe518bd8a0d0d246c0f65df340ee38) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/qml/qqmlimport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index a9107b908a..a6a8c54845 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -751,7 +751,7 @@ bool QQmlImportInstance::resolveType(QQmlTypeLoader *typeLoader, const QHashedSt
if (containingType.isValid()) {
// we currently cannot reference a Singleton inside itself
// in that case, containingType is still invalid
- if (int icID = containingType.lookupInlineComponentIdByName(typeStr) != -1) {
+ if (int icID = containingType.lookupInlineComponentIdByName(typeStr); icID != -1) {
*type_return = containingType.lookupInlineComponentById(icID);
} else {
auto icType = createICType();