replaced has_key

This commit is contained in:
Andreas Preikschat 2011-12-10 15:10:56 +01:00
parent 3cde99d9d9
commit 08743f147c

View File

@ -344,7 +344,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
if category.name is None: if category.name is None:
continue continue
for action in category.actions: for action in category.actions:
if self.changedActions.has_key(action): if action in self.changedActions:
old_shortcuts = map(unicode, old_shortcuts = map(unicode,
map(QtGui.QKeySequence.toString, action.shortcuts())) map(QtGui.QKeySequence.toString, action.shortcuts()))
action.setShortcuts(self.changedActions[action]) action.setShortcuts(self.changedActions[action])
@ -455,7 +455,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
those shortcuts which are not saved yet but already assigned (as changes those shortcuts which are not saved yet but already assigned (as changes
are applied when closing the dialog). are applied when closing the dialog).
""" """
if self.changedActions.has_key(action): if action in self.changedActions:
return self.changedActions[action] return self.changedActions[action]
return action.shortcuts() return action.shortcuts()