Check parent in rowCount/columnCount/canFetchMore

Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
This commit is contained in:
TheLastRar
2022-11-13 14:35:55 +00:00
parent 5558f3d2cc
commit fce323b945
20 changed files with 41 additions and 41 deletions

View File

@ -400,11 +400,11 @@ public:
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override
{
return m_servers.size();
return parent.isValid() ? 0 : m_servers.size();
}
int columnCount(const QModelIndex & parent) const override
{
return COLUMN_COUNT;
return parent.isValid() ? 0 : COLUMN_COUNT;
}
Server * at(int index)