forked from qt-creator/qt-creator
CppEditor: Add another sanity check to ParseContextModel
Task-number: QTCREATORBUG-22596 Change-Id: I222656503477ea8dbd3b65801d1816b77baa7c39 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -111,8 +111,10 @@ QString ParseContextModel::currentId() const
|
|||||||
return m_projectParts[m_currentIndex]->id();
|
return m_projectParts[m_currentIndex]->id();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ParseContextModel::rowCount(const QModelIndex &) const
|
int ParseContextModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
if (parent.isValid())
|
||||||
|
return 0;
|
||||||
return m_projectParts.size();
|
return m_projectParts.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user