From d0069ff8c91e0027a0a1f3ef7767dbb13e0eacc4 Mon Sep 17 00:00:00 2001 From: Luca Beldi Date: Wed, 1 Aug 2018 16:43:31 +0100 Subject: Add a method to clear the data to QStandardItemModel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the behavior of setItemData has been changed following QTBUG-45114, QStandardItemModel was lacking an interface to clear all the data from a single index. Task-number: QTBUG-69616 Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d Reviewed-by: André Hartmann Reviewed-by: David Faure --- src/corelib/itemmodels/qabstractitemmodel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/corelib/itemmodels/qabstractitemmodel.h') diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index 21171124f9..bec71b0606 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -198,6 +198,9 @@ public: virtual QMap itemData(const QModelIndex &index) const; virtual bool setItemData(const QModelIndex &index, const QMap &roles); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + virtual bool clearItemData(const QModelIndex &index); +#endif virtual QStringList mimeTypes() const; virtual QMimeData *mimeData(const QModelIndexList &indexes) const; -- cgit v1.2.3