aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-05-03 14:52:37 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-05-11 12:56:21 +0200
commit893b6ae6e890a2b8fc842d9c9cc64b9b8f34e22f (patch)
treeaa915c17e01a0fc8e04281ba930f099d2316fbb6 /tools
parent6d92633f32ff2089b8f0a39e07f0d40bf57d8011 (diff)
QML: Port QV4::CompiledData::Location to new special integer bitfield
Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-99545 Change-Id: If0d6f893f2351a4146ddf125be4079b5e312f308 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltc/prototype/codegenerator.cpp10
-rw-r--r--tools/qmltc/prototype/qml2cppcontext.h2
-rw-r--r--tools/qmltc/qmltccompiler.h2
-rw-r--r--tools/qmltc/qmltctyperesolver.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/qmltc/prototype/codegenerator.cpp b/tools/qmltc/prototype/codegenerator.cpp
index c431650f60..2981c6c395 100644
--- a/tools/qmltc/prototype/codegenerator.cpp
+++ b/tools/qmltc/prototype/codegenerator.cpp
@@ -359,16 +359,16 @@ void CodeGenerator::compileBinding(QmltcType &current, const QmlIR::Binding &bin
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;
}
}
@@ -1074,7 +1074,7 @@ 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);
}
QT_END_NAMESPACE
diff --git a/tools/qmltc/prototype/qml2cppcontext.h b/tools/qmltc/prototype/qml2cppcontext.h
index 3c17a632df..5d3d7f6071 100644
--- a/tools/qmltc/prototype/qml2cppcontext.h
+++ b/tools/qmltc/prototype/qml2cppcontext.h
@@ -58,7 +58,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/qmltccompiler.h b/tools/qmltc/qmltccompiler.h
index ef33aae393..88d8f1bb67 100644
--- a/tools/qmltc/qmltccompiler.h
+++ b/tools/qmltc/qmltccompiler.h
@@ -114,7 +114,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);
}
};
diff --git a/tools/qmltc/qmltctyperesolver.cpp b/tools/qmltc/qmltctyperesolver.cpp
index 594a986990..e3908dd4a7 100644
--- a/tools/qmltc/qmltctyperesolver.cpp
+++ b/tools/qmltc/qmltctyperesolver.cpp
@@ -67,7 +67,7 @@ QQmlJSScope::Ptr
QmltcTypeResolver::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);
}