}
}
+void KStandardItemModel::clear()
+{
+ int size = m_items.size();
+ m_items.clear();
+ m_indexesForItems.clear();
+
+ emit itemsRemoved(KItemRangeList() << KItemRange(0, size));
+}
+
KStandardItem* KStandardItemModel::item(int index) const
{
if (index < 0 || index >= m_items.count()) {
{
QList<QPair<int, QVariant> > groups;
- const QByteArray role = sortRole();
+ const QByteArray role = sortRole().isEmpty() ? "group" : sortRole();
bool isFirstGroupValue = true;
QString groupValue;
const int maxIndex = count() - 1;