From 9b5bd48fc652a7dd47c545db8338a580592f7f35 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 18 Feb 2020 15:20:38 +0100 Subject: QQmlAdaptorModel: Don't const_cast to call release() release() is const. Change-Id: I00171af75151741e725cd2ceaa80afcaac4f62a3 Reviewed-by: Fabian Kosmale --- src/qmlmodels/qqmladaptormodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qmlmodels/qqmladaptormodel.cpp') diff --git a/src/qmlmodels/qqmladaptormodel.cpp b/src/qmlmodels/qqmladaptormodel.cpp index 364d63dc29..64d9723a6d 100644 --- a/src/qmlmodels/qqmladaptormodel.cpp +++ b/src/qmlmodels/qqmladaptormodel.cpp @@ -458,7 +458,7 @@ public: void cleanup(QQmlAdaptorModel &) const override { - const_cast(this)->release(); + release(); } QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override -- cgit v1.2.3