Commit c3eb6784 authored by Dan Pascu's avatar Dan Pascu

Reordered contact loading/saving methods

parent 80bd2578
...@@ -630,9 +630,6 @@ class ContactModel(QAbstractListModel): ...@@ -630,9 +630,6 @@ class ContactModel(QAbstractListModel):
self.endRemoveRows() self.endRemoveRows()
return items return items
def save(self):
self.save_queue.put(pickle.dumps(self.items))
def load(self): def load(self):
try: try:
try: try:
...@@ -661,6 +658,9 @@ class ContactModel(QAbstractListModel): ...@@ -661,6 +658,9 @@ class ContactModel(QAbstractListModel):
if file is None: if file is None:
self.save() self.save()
def save(self):
self.save_queue.put(pickle.dumps(self.items))
def store_contacts(self, data): def store_contacts(self, data):
makedirs(ApplicationData.directory) makedirs(ApplicationData.directory)
filename = ApplicationData.get('contacts') filename = ApplicationData.get('contacts')
......
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