Commit 4092127d authored by Luci Stanescu's avatar Luci Stanescu

Replaced use of Qt4.6+ methods

parent 604008e2
......@@ -646,9 +646,14 @@ class ContactModel(QAbstractListModel):
Contact(group, 'VUC Conference', '200901@login.zipdx.com', 'icons/200901@login.zipdx.com.png')]
contacts.sort(key=attrgetter('name'))
items = [group] + contacts
self.beginResetModel()
self.items = items
self.endResetModel()
if self.items:
self.beginRemoveRows(QModelIndex(), 0, len(self.items)-1)
del self.items[:]
self.endRemoveRows()
if items:
self.beginInsertRows(QModelIndex(), 0, len(items)-1)
self.items = items
self.endInsertRows()
for position, item in enumerate(self.items):
if type(item) is ContactGroup:
self.contact_list.openPersistentEditor(self.index(position))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment