diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-23 09:42:16 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-31 17:08:00 +0000 |
commit | 9337b1c339c34cd4fe10d236be2ee61ca76e17ba (patch) | |
tree | 4fa5482063e447dc7d9988069cdeafd255e8933b /src/qml/compiler/qv4compileddata_p.h | |
parent | 0a0e6e2ad2ed8224b5c1b6cd179677198e87288c (diff) |
Clean up compilation unit string resolution
Replace use of CompiledData::Unit::stringAt with
CompilationUnit::stringAt as central place, in preparation for allowing
derived compilation units to retrieve strings from base units.
Change-Id: Ifafe6c18a9fd8d1e2259a60c17200124869b4c2d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 715882c985..b3edf1c701 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -830,7 +830,7 @@ struct Unit } /* end QML specific fields*/ - QString stringAt(int idx) const { + QString stringAtInternal(int idx) const { const quint32_le *offsetTable = reinterpret_cast<const quint32_le*>((reinterpret_cast<const char *>(this)) + offsetToStringTable); const quint32_le offset = offsetTable[idx]; const String *str = reinterpret_cast<const String*>(reinterpret_cast<const char *>(this) + offset); @@ -1035,8 +1035,8 @@ public: // finalUrl() and finalUrlString() shall be used to resolve further URLs referred to in the code // They are _not_ intercepted and thus represent the "logical" name for the code. - QString fileName() const { return data->stringAt(data->sourceFileIndex); } - QString finalUrlString() const { return data->stringAt(data->finalUrlIndex); } + QString fileName() const { return stringAt(data->sourceFileIndex); } + QString finalUrlString() const { return stringAt(data->finalUrlIndex); } QUrl url() const { if (m_url.isNull) m_url = QUrl(fileName()); return m_url; } QUrl finalUrl() const { @@ -1088,7 +1088,7 @@ public: typedef Object CompiledObject; int objectCount() const { return data->nObjects; } const Object *objectAt(int index) const { return data->objectAt(index); } - QString stringAt(int index) const { return data->stringAt(index); } + QString stringAt(int index) const { return data->stringAtInternal(index); } struct FunctionIterator { |