Skip to content
Snippets Groups Projects
Commit e7aadb2d authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Emmanuel Lepage Vallee
Browse files

contactmodel: fix faulty rowsInserted() signal

Refs #70320
parent 0c847df8
No related branches found
No related tags found
No related merge requests found
...@@ -283,16 +283,16 @@ void CategorizedContactModelPrivate::slotContactAdded(const Person* c) ...@@ -283,16 +283,16 @@ void CategorizedContactModelPrivate::slotContactAdded(const Person* c)
item->m_lChildren << contactNode; item->m_lChildren << contactNode;
} q_ptr->endInsertRows(); } q_ptr->endInsertRows();
q_ptr->beginInsertRows(q_ptr->createIndex(contactNode->m_Index,0,contactNode),0,c->phoneNumbers().size());
if (c->phoneNumbers().size() > 1) { if (c->phoneNumbers().size() > 1) {
q_ptr->beginInsertRows(q_ptr->createIndex(contactNode->m_Index,0,contactNode),0,c->phoneNumbers().size() - 1);
for (ContactMethod* m : c->phoneNumbers() ) { for (ContactMethod* m : c->phoneNumbers() ) {
ContactTreeNode* n2 = new ContactTreeNode(m,q_ptr); ContactTreeNode* n2 = new ContactTreeNode(m,q_ptr);
n2->m_Index = contactNode->m_lChildren.size(); n2->m_Index = contactNode->m_lChildren.size();
n2->m_pParent = contactNode; n2->m_pParent = contactNode;
contactNode->m_lChildren << n2; contactNode->m_lChildren << n2;
} }
}
q_ptr->endInsertRows(); q_ptr->endInsertRows();
}
//emit layoutChanged(); //emit layoutChanged();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment