From 727fd64e121f97b32d645e2fb26c4e93c413a849 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 17 May 2012 21:59:51 +0200 Subject: Create unit-test for KStandardItemModel --- src/kitemviews/kstandarditemmodel.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/kitemviews/kstandarditemmodel.h') diff --git a/src/kitemviews/kstandarditemmodel.h b/src/kitemviews/kstandarditemmodel.h index 047c1e9b6..34032bf07 100644 --- a/src/kitemviews/kstandarditemmodel.h +++ b/src/kitemviews/kstandarditemmodel.h @@ -47,14 +47,16 @@ public: * Inserts the item \a item at the index \a index. If the index * is equal to the number of items of the model, the item * gets appended as last element. KStandardItemModel takes - * the ownership of the item. + * the ownership of the item. If the index is invalid, the item + * gets deleted. */ void insertItem(int index, KStandardItem* item); /** * Changes the item on the index \a index to \a item. * KStandardItemModel takes the ownership of the item. The - * old item gets deleted. + * old item gets deleted. If the index is invalid, the item + * gets deleted. */ void changeItem(int index, KStandardItem* item); @@ -102,6 +104,7 @@ private: QHash m_indexesForItems; friend class KStandardItem; + friend class KStandardItemModelTest; // For unit testing }; #endif -- cgit v1.3