Skip to content
Snippets Groups Projects
Commit fd77f882 authored by Alexandre Lision's avatar Alexandre Lision Committed by gerrit2
Browse files

textrecording: guard on rowCount

return 0 if parent index is valid, this model does not have children

Change-Id: I53286bfe466cb3a76e378f7e833a16a16a9441b3
Tuleap: #202
parent bc9cf90c
No related branches found
No related tags found
No related merge requests found
...@@ -613,8 +613,9 @@ QVariant InstantMessagingModel::data( const QModelIndex& idx, int role) const ...@@ -613,8 +613,9 @@ QVariant InstantMessagingModel::data( const QModelIndex& idx, int role) const
///Number of row ///Number of row
int InstantMessagingModel::rowCount(const QModelIndex& parentIdx) const int InstantMessagingModel::rowCount(const QModelIndex& parentIdx) const
{ {
Q_UNUSED(parentIdx) if (!parentIdx.isValid())
return m_pRecording->d_ptr->m_lNodes.size(); return m_pRecording->d_ptr->m_lNodes.size();
return 0;
} }
///Model flags ///Model flags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment