summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.h
diff options
context:
space:
mode:
authorLuca Beldi <v.ronin@yahoo.it>2018-08-01 16:43:31 +0100
committerLuca Beldi <v.ronin@yahoo.it>2018-08-17 07:17:12 +0000
commitd0069ff8c91e0027a0a1f3ef7767dbb13e0eacc4 (patch)
tree4305eb9240e4880edda8f355cdc057a92ce6dd6c /src/corelib/itemmodels/qabstractitemmodel.h
parent67352c92761fcb2e2c6a98b24e1bf5f33805cb3a (diff)
Add a method to clear the data to QStandardItemModel
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 <aha_1980@gmx.de> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h3
1 files changed, 3 insertions, 0 deletions
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<int, QVariant> itemData(const QModelIndex &index) const;
virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &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;