diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-05-31 14:02:34 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-15 07:04:12 +0200 |
| commit | f198d4e3f07f10d302af2535b7e3a943193947fd (patch) | |
| tree | d5838d0be5c61af8e274e54026a8224b9648b24a /src/qmlcompiler/qqmljsutils.cpp | |
| parent | 01d2f7f7def9b329db173ec4c4bbd4b909a59c9b (diff) | |
QmlCompiler: Divide scope-name lookup methods into multiple cases
* One method for IDs only, since that seems to be common
* One method operating on QQmlJSRegisterContent all the way
* One method operating on QQmlJSScope::ConstPtr all the way
This way we can return a QQmlJSScope::ConstPtr where we are not
interested in register contents, and in a next step, link the register
contents together in case we are interested.
We need to store the function's QML scope as QQmlJSRegisterContent now.
Task-number: QTBUG-124670
Change-Id: I01699aaa5f645657d9faf23b12e270cf09679499
Reviewed-by: Alexei Cazacov <alexei.cazacov@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, 1 insertions, 4 deletions
diff --git a/src/qmlcompiler/qqmljsutils.cpp b/src/qmlcompiler/qqmljsutils.cpp index c6eb09b313..6de8741f1b 100644 --- a/src/qmlcompiler/qqmljsutils.cpp +++ b/src/qmlcompiler/qqmljsutils.cpp @@ -80,10 +80,7 @@ QQmlJSUtils::ResolvedAlias QQmlJSUtils::resolveAlias(const QQmlJSTypeResolver *t { return ::resolveAlias( [&](const QString &id, const QQmlJSScope::ConstPtr &referrer) { - const QQmlJSRegisterContent content = typeResolver->scopedType(referrer, id); - if (content.variant() == QQmlJSRegisterContent::ObjectById) - return content.type(); - return QQmlJSScope::ConstPtr(); + return typeResolver->typeForId(referrer, id); }, property, owner, visitor); } |
