forked from openlp/openlp
use iteritems
This commit is contained in:
parent
738729e779
commit
3824c33607
@ -87,7 +87,8 @@ class BaseModel(object):
|
||||
Creates an instance of a class and populates it, returning the instance
|
||||
"""
|
||||
instance = cls()
|
||||
[instance.__setattr__(key, kwargs[key]) for key in kwargs]
|
||||
for key, value in kwargs.iteritems():
|
||||
instance.__setattr__(key, value)
|
||||
return instance
|
||||
|
||||
|
||||
|
@ -140,7 +140,8 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
``widgets``
|
||||
The list of names of widgets to be hidden.
|
||||
"""
|
||||
[self.actions[widget].setVisible(False) for widget in widgets]
|
||||
for widget in widgets:
|
||||
self.actions[widget].setVisible(False)
|
||||
|
||||
def makeWidgetsVisible(self, widgets):
|
||||
"""
|
||||
@ -149,7 +150,8 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
``widgets``
|
||||
The list of names of widgets to be shown.
|
||||
"""
|
||||
[self.actions[widget].setVisible(True) for widget in widgets]
|
||||
for widget in widgets:
|
||||
self.actions[widget].setVisible(True)
|
||||
|
||||
def addPushButton(self, image_file=None, text=u''):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user