aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertyvalidator.cpp
diff options
context:
space:
mode:
authorAmanda Hamblin-Trué <amanda.hamblin-true@qt.io>2023-06-29 10:54:15 +0200
committerAmanda Hamblin-Trué <amanda.hamblin-true@qt.io>2023-07-05 10:34:12 +0000
commit514fa7e28403b8ff5e0e95084d318fe11698db2b (patch)
treed24521f5703ed0717e2654cf2e4be96bb9918389 /src/qml/qml/qqmlpropertyvalidator.cpp
parent1e5252f82e2c4e0c7922a21f5442ffbd534d2a15 (diff)
Remove redundant warning
We already have a generic warning for assigning null to properties that don't support it, so we warn twice. Removed redundant warning so that we only warn once. This partially reverts commit 16aff415a44f5f10c5ac95da72559839305c8ae5. [ChangeLog][QtQml][Important Behavior Changes] Assigning null to a property of incompatible type is now an error instead of a warning. Fixes: QTBUG-102980 Change-Id: I739913ab64628376727b751512717eb4bf7ea5f4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertyvalidator.cpp')
-rw-r--r--src/qml/qml/qqmlpropertyvalidator.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/qml/qml/qqmlpropertyvalidator.cpp b/src/qml/qml/qqmlpropertyvalidator.cpp
index 764e8b4938..b1a61d7e35 100644
--- a/src/qml/qml/qqmlpropertyvalidator.cpp
+++ b/src/qml/qml/qqmlpropertyvalidator.cpp
@@ -379,19 +379,6 @@ QQmlError QQmlPropertyValidator::validateLiteralBinding(
}
auto warnOrError = [&](const QString &error) {
- if (binding->type() == QV4::CompiledData::Binding::Type_Null) {
- QQmlError warning;
- warning.setUrl(compilationUnit->url());
- warning.setLine(qmlConvertSourceCoordinate<quint32, int>(
- binding->valueLocation.line()));
- warning.setColumn(qmlConvertSourceCoordinate<quint32, int>(
- binding->valueLocation.column()));
- warning.setDescription(error + tr(" - Assigning null to incompatible properties in QML "
- "is deprecated. This will become a compile error in "
- "future versions of Qt."));
- enginePrivate->warning(warning);
- return noError;
- }
return qQmlCompileError(binding->valueLocation, error);
};