diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-10-01 13:16:17 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-10-02 08:46:46 +0000 |
| commit | e7146cd98700c29802214a39a4cefd9db146c97a (patch) | |
| tree | fc7683486e7ae750e26d2e2076a86a4fd271f86e /src/qml/compiler/qv4compiler_p.h | |
| parent | a5a814d26a8d02c0752fab9ec6cc8c2447c10182 (diff) | |
QmlCompiler: Allow string lookup of composite metatypes again
We're not guaranteed to get string IDs for those.
Pick-to: 6.8
Change-Id: I5800a1e90589f3a6ae55ce8624fa56968f0f3ec3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit b8c3cf7192fe5793fdaf56a1203cb2cf76d8c3a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/compiler/qv4compiler_p.h')
| -rw-r--r-- | src/qml/compiler/qv4compiler_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h index bf2f5c8167..05423b6afb 100644 --- a/src/qml/compiler/qv4compiler_p.h +++ b/src/qml/compiler/qv4compiler_p.h @@ -47,6 +47,7 @@ struct Q_QML_COMPILER_EXPORT StringTableGenerator { int registerString(const QString &str); int getStringId(const QString &string) const; + bool hasStringId(const QString &string) const { return stringToId.contains(string); } QString stringForIndex(int index) const { return strings.at(index); } uint stringCount() const { return strings.size() - backingUnitTableSize; } @@ -83,6 +84,7 @@ struct Q_QML_COMPILER_EXPORT JSUnitGenerator { int registerString(const QString &str) { return stringTable.registerString(str); } int getStringId(const QString &string) const { return stringTable.getStringId(string); } + bool hasStringId(const QString &string) const { return stringTable.hasStringId(string); } QString stringForIndex(int index) const { return stringTable.stringForIndex(index); } int registerGetterLookup(const QString &name, LookupMode mode); |
