diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-11-22 12:50:22 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-11-23 18:58:24 +0100 |
| commit | 8d7f18ec44dadc3085afdcc808713292b709ed39 (patch) | |
| tree | ffbfc3a4601690f8cfd7ca608d936f6927768441 /src/qmlcompiler/qqmljsutils.cpp | |
| parent | f769a0b5d7f0359ceb82a8a9f947c3a9c0a42184 (diff) | |
QmlCompiler: Remove QQmlJSTypeResolver::scopeForId and idForScope
You should always do the full lookup. You might find a property instead
of an ID, after all.
Task-number: QTBUG-119162
Change-Id: Id96bc19e6fd7e7967382091c7de7bb398bfd311b
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsutils.cpp')
| -rw-r--r-- | src/qmlcompiler/qqmljsutils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsutils.cpp b/src/qmlcompiler/qqmljsutils.cpp index f5ee66b527..65f61d8ce3 100644 --- a/src/qmlcompiler/qqmljsutils.cpp +++ b/src/qmlcompiler/qqmljsutils.cpp @@ -80,7 +80,10 @@ QQmlJSUtils::ResolvedAlias QQmlJSUtils::resolveAlias(const QQmlJSTypeResolver *t { return ::resolveAlias( [&](const QString &id, const QQmlJSScope::ConstPtr &referrer) { - return typeResolver->scopeForId(id, referrer); + const QQmlJSRegisterContent content = typeResolver->scopedType(referrer, id); + if (content.variant() == QQmlJSRegisterContent::ObjectById) + return content.type(); + return QQmlJSScope::ConstPtr(); }, property, owner, visitor); } |
