From 163c515783877b8b0ffb8b5c1bab288addee9745 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 22 Sep 2017 10:18:08 +0200 Subject: Fix use-after-free when clear()ing all elements from a ListModel Same problem as the problem with remove(), so now clear will call into remove to do the correct thing. See also e29ffa179e9920443a23e2fcb3f0694df32e8a68. [ChangeLog][Qt][Qml] Fix possible use-after-free when clearing all items from a ListModel through JavaScript. Change-Id: Ib9389d80798c4333425b4a49930b1670307d06ac Task-number: QTBUG-59256 Reviewed-by: Simon Hausmann --- src/qml/types/qqmllistmodel_p_p.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/qml/types/qqmllistmodel_p_p.h') diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h index 4928ad3725..10916f10db 100644 --- a/src/qml/types/qqmllistmodel_p_p.h +++ b/src/qml/types/qqmllistmodel_p_p.h @@ -366,7 +366,6 @@ public: int append(QV4::Object *object); void insert(int elementIndex, QV4::Object *object); - void clear(); Q_REQUIRED_RESULT QVector> remove(int index, int count); int appendElement(); -- cgit v1.2.3