aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertyvalidator.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-03-10 12:09:00 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-03-14 16:44:35 +0100
commit9de2b11a7033a1969156277bafa848b5c178baa1 (patch)
treee9d349e5165350b50065663e3b9efadd94738cb8 /src/qml/qml/qqmlpropertyvalidator.cpp
parente5246cafffb93f69a49c133210390c253fcb71f2 (diff)
Make most QQmlPropertyData const
You really should not mess with that after creating the property cache. Change-Id: I070200772475bb67f539dbbd85a298020b14ca79 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertyvalidator.cpp')
-rw-r--r--src/qml/qml/qqmlpropertyvalidator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlpropertyvalidator.cpp b/src/qml/qml/qqmlpropertyvalidator.cpp
index 603bbf8b03..1bdcfc220c 100644
--- a/src/qml/qml/qqmlpropertyvalidator.cpp
+++ b/src/qml/qml/qqmlpropertyvalidator.cpp
@@ -149,7 +149,7 @@ QVector<QQmlError> QQmlPropertyValidator::validateObject(
QQmlPropertyResolver propertyResolver(propertyCache);
QString defaultPropertyName;
- QQmlPropertyData *defaultProperty = nullptr;
+ const QQmlPropertyData *defaultProperty = nullptr;
if (obj->indexOfDefaultPropertyOrAlias != -1) {
const QQmlPropertyCache *cache = propertyCache->parent().data();
defaultPropertyName = cache->defaultPropertyName();
@@ -182,7 +182,7 @@ QVector<QQmlError> QQmlPropertyValidator::validateObject(
bool isGroupProperty = instantiatingBinding && instantiatingBinding->type == QV4::CompiledData::Binding::Type_GroupProperty;
bool notInRevision = false;
- QQmlPropertyData *pd = nullptr;
+ const QQmlPropertyData *pd = nullptr;
if (!name.isEmpty()) {
if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerExpression
|| binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject) {
@@ -380,7 +380,7 @@ QVector<QQmlError> QQmlPropertyValidator::validateObject(
}
QQmlError QQmlPropertyValidator::validateLiteralBinding(
- const QQmlPropertyCache::ConstPtr &propertyCache, QQmlPropertyData *property,
+ const QQmlPropertyCache::ConstPtr &propertyCache, const QQmlPropertyData *property,
const QV4::CompiledData::Binding *binding) const
{
if (property->isQList()) {
@@ -698,7 +698,7 @@ QVector<QQmlError> QQmlPropertyValidator::recordError(const QQmlError &error) co
return errors;
}
-QQmlError QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *property, const QString &propertyName, const QV4::CompiledData::Binding *binding) const
+QQmlError QQmlPropertyValidator::validateObjectBinding(const QQmlPropertyData *property, const QString &propertyName, const QV4::CompiledData::Binding *binding) const
{
QQmlError noError;