aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-04-27 13:54:32 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-04-28 15:59:43 +0200
commitacdef32ab927e17d8d832b514f35f7985ac782a1 (patch)
tree6e8daab1fd3f1f77d557e30ccd16726e9bb257d1 /tools
parentadf46bcc1bca69eca900d7737c58d0fe1f75bd0e (diff)
qmllint: Properly handle "on" bindings
Previously "on" bindings were handled like normal property assignments, this is obviously wrong. Fixes: QTBUG-93189 Change-Id: Ifda51103cafeb2488c54e0ac702e564771767f18 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmllint/checkidentifiers.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp
index bd2dd2255e..a22727492d 100644
--- a/tools/qmllint/checkidentifiers.cpp
+++ b/tools/qmllint/checkidentifiers.cpp
@@ -117,7 +117,7 @@ void CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members,
if (!property.propertyName().isEmpty()) {
const auto binding = scope->propertyBinding(access.m_name);
const QString typeName = access.m_parentType.isEmpty()
- ? (binding.isValid() ? binding.typeName() : property.typeName())
+ ? (binding.hasValue() ? binding.valueTypeName() : property.typeName())
: access.m_parentType;
if (property.isList()) {
@@ -135,8 +135,8 @@ void CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members,
}
if (access.m_parentType.isEmpty()) {
- if (binding.isValid())
- scope = binding.type();
+ if (binding.hasValue())
+ scope = binding.value();
else
scope = property.type();
@@ -350,8 +350,8 @@ void CheckIdentifiers::operator()(
continue;
const auto binding = qmlScope->propertyBinding(memberAccessBase.m_name);
- if (binding.isValid()) {
- checkMemberAccess(memberAccessChain, binding.type(), &property);
+ if (binding.hasValue()) {
+ checkMemberAccess(memberAccessChain, binding.value(), &property);
} else if (!property.type()) {
m_logger->log(QString::fromLatin1(
"Type of property \"%2\" not found")