Skip to content
Permalink
Browse files

DBManager: don't raise any errors while disconnecting signals from de…

…stroyed objects
  • Loading branch information
brushtyler committed May 20, 2012
1 parent c2118e7 commit b4d8a5aea73712bba9d650bea85a1080610b9bed
Showing with 9 additions and 2 deletions.
  1. +9 −2 python/plugins/db_manager/table_viewer.py
@@ -67,7 +67,12 @@ def setDirty(self, val=True):

def _clear(self):
if self.item is not None:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
try:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
except:
# do not raise any error if self.item was deleted
pass

self.item = None
self.dirty = False

@@ -83,11 +88,13 @@ def _loadTableData(self, table):
self.setModel( table.tableDataModel(self) )

except DbError, e:
QApplication.restoreOverrideCursor()
DlgDbError.showError(e, self)
return

else:
self.update()

finally:
QApplication.restoreOverrideCursor()


0 comments on commit b4d8a5a

Please sign in to comment.
You can’t perform that action at this time.