aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlimport.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-17 10:30:28 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-19 00:14:12 +0100
commit7104a3a6f8fe518bd8a0d0d246c0f65df340ee38 (patch)
treeff621f0a7ffff2e5294105146f17fc5db00da040 /src/qml/qml/qqmlimport.cpp
parentce950d619aef3ad0534544b2e029a6f025b256a5 (diff)
Fix lookup of existing inline components by name
Previously this would always return the inline component iwth ID 1. Pick-to: 5.15 6.0 6.1 Change-Id: I49dc6eb64fcd8428667f3b22afcb7212aa792db3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-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 670a6617fc..d95ae0de0e 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -756,7 +756,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();