aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-10-17 15:36:54 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-10-18 09:22:29 +0200
commit53b9c17749f43a0e94f63871e7fbcc0ccda7a892 (patch)
tree6634046a4f3ff756597677cf081c420751d96fb5 /tests/auto/qml/qmllint
parentf55a9d067861bd1f5c910a1585a2a6811432fa8e (diff)
QmlCompiler: Prohibit writing to readonly properties
The extra check for hasOwnProperty() was wrong. It was originally meant for qmllint to find initial assignments to the same property but qmllint has a different way of identifying those these days. Amends commit d2507f238370f6432cd8d65aa7f335dd68484e5a. Pick-to: 6.6 6.5 Fixes: QTBUG-118100 Change-Id: I6151b8088315b6a99e331b0830b9fdd8188a30cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r--tests/auto/qml/qmllint/data/initReadonly.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/initReadonly.qml b/tests/auto/qml/qmllint/data/initReadonly.qml
index 5a3cafff23..a9a2a0016b 100644
--- a/tests/auto/qml/qmllint/data/initReadonly.qml
+++ b/tests/auto/qml/qmllint/data/initReadonly.qml
@@ -2,4 +2,5 @@ import QtQml
QtObject {
readonly property int i: 14
+ readonly property int j: i + 20
}