uniformise calls to [begin/end]ResetModel() and removed calls to layoutAboutToBeChanged() as it may cause some SIGSEGV

This commit is contained in:
csoler 2020-08-16 22:17:54 +02:00
parent 82ba488574
commit 3b7734c934
2 changed files with 5 additions and 19 deletions

View file

@ -152,15 +152,13 @@ void RsFriendListModel::setDisplayGroups(bool b)
}
void RsFriendListModel::preMods()
{
emit layoutAboutToBeChanged();
beginResetModel();
}
void RsFriendListModel::postMods()
{
endResetModel();
emit layoutChanged();
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
}
int RsFriendListModel::rowCount(const QModelIndex& parent) const