KDE/kdevelop/lib/interfaces
Matt Rogers
mattr at kde.org
Thu Mar 16 02:38:07 UTC 2006
SVN commit 519050 by mattr:
if the row is zero and the parent item's group has no items return
an invalid model index.
fixes the assert i was seeing on startup.
further review would be appreciated.
CCMAIL: kdevelop-devel at kdevelop.org
M +3 -1 kdevitemmodel.cpp
--- trunk/KDE/kdevelop/lib/interfaces/kdevitemmodel.cpp #519049:519050
@@ -96,7 +96,9 @@
Q_ASSERT(parent_item != 0);
Q_ASSERT(parent_item->group() != 0);
- Q_ASSERT(row < parent_item->group()->itemCount());
+ //Q_ASSERT(row < parent_item->group()->itemCount());
+ if ( row == 0 && parent_item->group()->itemCount() == 0 )
+ return QModelIndex();
return createIndex(row, column, parent_item->group()->itemAt(row));
}
More information about the KDevelop-devel
mailing list