diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-08 16:48:06 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-12 20:00:24 +0200 |
| commit | dfa51fe0bcc4dafac454791e24e6bb4b919438d7 (patch) | |
| tree | 1bdb1f77fc8d23683f0a71bd6d3fa3c6c9e1a08e /src | |
| parent | 05e0dc2a88e751e97573610fd483f79da3e78854 (diff) | |
qmllint: Do not complain about writing to list properties
List properties cannot be read-only.
Pick-to: 6.6 6.5
Fixes: QTBUG-114144
Change-Id: Icaf69f581cfb5cdbb75e9b319fcb27b477f241b0
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmlcompiler/qqmljstypepropagator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljstypepropagator.cpp b/src/qmlcompiler/qqmljstypepropagator.cpp index 3a02cd7714..21e87a9321 100644 --- a/src/qmlcompiler/qqmljstypepropagator.cpp +++ b/src/qmlcompiler/qqmljstypepropagator.cpp @@ -931,7 +931,7 @@ void QQmlJSTypePropagator::generate_StoreProperty(int nameIndex, int base) return; } - if (!property.isWritable()) { + if (!property.isWritable() && !property.storedType()->isListProperty()) { setError(u"Can't assign to read-only property %1"_s.arg(propertyName)); m_logger->log(u"Cannot assign to read-only property %1"_s.arg(propertyName), |
