diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-03 14:52:37 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-17 11:15:40 +0200 |
commit | bceff2291da4dcca895a1e468073cb0c36e0dbd3 (patch) | |
tree | 590c41acd591a76f9ad94c8e07070a2f98307828 /tools/qmltc | |
parent | da06d6ca852254c4e24b6e69923f5d9dd4b87c8d (diff) |
QML: Port QV4::CompiledData::Location to new special integer bitfield
Task-number: QTBUG-99545
Change-Id: If0d6f893f2351a4146ddf125be4079b5e312f308
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 893b6ae6e890a2b8fc842d9c9cc64b9b8f34e22f)
Diffstat (limited to 'tools/qmltc')
-rw-r--r-- | tools/qmltc/prototype/codegenerator.cpp | 10 | ||||
-rw-r--r-- | tools/qmltc/prototype/qml2cppcontext.h | 2 | ||||
-rw-r--r-- | tools/qmltc/prototype/typeresolver.cpp | 2 | ||||
-rw-r--r-- | tools/qmltc/qmltccompiler.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/qmltc/prototype/codegenerator.cpp b/tools/qmltc/prototype/codegenerator.cpp index 34d059c836..a28aea37fc 100644 --- a/tools/qmltc/prototype/codegenerator.cpp +++ b/tools/qmltc/prototype/codegenerator.cpp @@ -1189,16 +1189,16 @@ void CodeGenerator::compileBinding(QQmlJSAotObject ¤t, const QmlIR::Bindin qCWarning(lcCodeGenerator) << QStringLiteral("Binding at line %1 column %2 is not deferred as it is a " "binding on a group property.") - .arg(QString::number(binding.location.line), - QString::number(binding.location.column)); + .arg(QString::number(binding.location.line()), + QString::number(binding.location.column())); // we do not support PropertyChanges and other types with similar // behavior yet, so this binding is compiled } else { qCDebug(lcCodeGenerator) << QStringLiteral( "Binding at line %1 column %2 is deferred and thus not compiled") - .arg(QString::number(binding.location.line), - QString::number(binding.location.column)); + .arg(QString::number(binding.location.line()), + QString::number(binding.location.column())); return; } } @@ -1939,5 +1939,5 @@ void CodeGenerator::recordError(const QQmlJS::SourceLocation &location, const QS void CodeGenerator::recordError(const QV4::CompiledData::Location &location, const QString &message) { - recordError(QQmlJS::SourceLocation { 0, 0, location.line, location.column }, message); + recordError(QQmlJS::SourceLocation { 0, 0, location.line(), location.column() }, message); } diff --git a/tools/qmltc/prototype/qml2cppcontext.h b/tools/qmltc/prototype/qml2cppcontext.h index 56bb5a12db..7656ea2859 100644 --- a/tools/qmltc/prototype/qml2cppcontext.h +++ b/tools/qmltc/prototype/qml2cppcontext.h @@ -57,7 +57,7 @@ struct Qml2CppContext void recordError(const QV4::CompiledData::Location &location, const QString &message) const { - recordError(QQmlJS::SourceLocation { 0, 0, location.line, location.column }, message); + recordError(QQmlJS::SourceLocation { 0, 0, location.line(), location.column() }, message); } }; diff --git a/tools/qmltc/prototype/typeresolver.cpp b/tools/qmltc/prototype/typeresolver.cpp index 25d340afe7..bf3bdeea80 100644 --- a/tools/qmltc/prototype/typeresolver.cpp +++ b/tools/qmltc/prototype/typeresolver.cpp @@ -75,7 +75,7 @@ void TypeResolver::init(Visitor &visitor, QQmlJS::AST::Node *program) QQmlJSScope::Ptr TypeResolver::scopeForLocation(const QV4::CompiledData::Location &location) const { qCDebug(lcTypeResolver2()).nospace() - << "looking for object at " << location.line << ':' << location.column; + << "looking for object at " << location.line() << ':' << location.column(); return m_objectsByLocationNonConst.value(location); } diff --git a/tools/qmltc/qmltccompiler.h b/tools/qmltc/qmltccompiler.h index e55ee47538..248029719f 100644 --- a/tools/qmltc/qmltccompiler.h +++ b/tools/qmltc/qmltccompiler.h @@ -102,7 +102,7 @@ private: void recordError(const QV4::CompiledData::Location &location, const QString &message, QQmlJSLoggerCategory category = Log_Compiler) { - recordError(QQmlJS::SourceLocation { 0, 0, location.line, location.column }, message, + recordError(QQmlJS::SourceLocation { 0, 0, location.line(), location.column() }, message, category); } }; |