aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodel_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-09-22 10:18:08 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-09-22 09:02:20 +0000
commit163c515783877b8b0ffb8b5c1bab288addee9745 (patch)
tree7ab027a284793c253f0717c623cf5d82b62a5ae3 /src/qml/types/qqmllistmodel_p.h
parent221b3f614a9c58cd5ac1aa4c36d36fb8a4cd56d0 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/types/qqmllistmodel_p.h')
-rw-r--r--src/qml/types/qqmllistmodel_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index b750d30676..1fda703797 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -165,6 +165,8 @@ private:
void emitItemsInserted(int index, int count);
void emitItemsAboutToBeMoved(int from, int to, int n);
void emitItemsMoved(int from, int to, int n);
+
+ void removeElements(int index, int removeCount);
};
// ### FIXME