Skip to content
Permalink
Browse files

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

…stroyed objects
  • Loading branch information
brushtyler authored and jef-n committed May 21, 2012
1 parent 8cb380a commit db6f314f3828ef38f381532d16d4a2e602d2cb14
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 db6f314

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