Replace calls to "apply(f, args)" with "f(*args)"

This commit is contained in:
Sebastien Helleu 2011-12-24 11:57:43 +01:00
parent 141c8d304b
commit 67ae320438
7 changed files with 11 additions and 11 deletions

View File

@ -32,7 +32,7 @@ class AboutDialog(QtGui.QDialog):
"""About dialog."""
def __init__(self, name, messages, *args):
apply(QtGui.QDialog.__init__, (self,) + args)
QtGui.QDialog.__init__(*(self,) + args)
self.setModal(True)
self.setWindowTitle(name)

View File

@ -34,7 +34,7 @@ class GenericListWidget(QtGui.QListWidget):
"""Generic QListWidget with dynamic size."""
def __init__(self, *args):
apply(QtGui.QListWidget.__init__, (self,) + args)
QtGui.QListWidget.__init__(*(self,) + args)
self.setMaximumWidth(100)
self.setTextElideMode(QtCore.Qt.ElideNone)
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
@ -52,17 +52,17 @@ class GenericListWidget(QtGui.QListWidget):
def clear(self, *args):
"""Re-implement clear to set dynamic size after clear."""
apply(QtGui.QListWidget.clear, (self,) + args)
QtGui.QListWidget.clear(*(self,) + args)
self.auto_resize()
def addItem(self, *args):
"""Re-implement addItem to set dynamic size after add."""
apply(QtGui.QListWidget.addItem, (self,) + args)
QtGui.QListWidget.addItem(*(self,) + args)
self.auto_resize()
def insertItem(self, *args):
"""Re-implement insertItem to set dynamic size after insert."""
apply(QtGui.QListWidget.insertItem, (self,) + args)
QtGui.QListWidget.insertItem(*(self,) + args)
self.auto_resize()
@ -70,7 +70,7 @@ class BufferListWidget(GenericListWidget):
"""Widget with list of buffers."""
def __init__(self, *args):
apply(GenericListWidget.__init__, (self,) + args)
GenericListWidget.__init__(*(self,) + args)
def switch_prev_buffer(self):
if self.currentRow() > 0:

View File

@ -35,7 +35,7 @@ class ChatTextEdit(QtGui.QTextEdit):
"""Chat area."""
def __init__(self, debug, *args):
apply(QtGui.QTextEdit.__init__, (self,) + args)
QtGui.QTextEdit.__init__(*(self,) + args)
self.debug = debug
self.readOnly = True
self.setFocusPolicy(QtCore.Qt.NoFocus)

View File

@ -31,7 +31,7 @@ class ConnectionDialog(QtGui.QDialog):
"""Connection window with server/port/password fields."""
def __init__(self, values, *args):
apply(QtGui.QDialog.__init__, (self,) + args)
QtGui.QDialog.__init__(*(self,) + args)
self.values = values
self.setModal(True)

View File

@ -33,7 +33,7 @@ class DebugDialog(QtGui.QDialog):
"""Debug dialog."""
def __init__(self, *args):
apply(QtGui.QDialog.__init__, (self,) + args)
QtGui.QDialog.__init__(*(self,) + args)
self.resize(640, 480)
self.setWindowTitle('Debug console')

View File

@ -43,7 +43,7 @@ class Network(QtCore.QObject):
messageFromWeechat = qt_compat.Signal(QtCore.QByteArray)
def __init__(self, *args):
apply(QtCore.QObject.__init__, (self,) + args)
QtCore.QObject.__init__(*(self,) + args)
self.status_disconnected = 'disconnected'
self.status_connecting = 'connecting...'
self.status_connected = 'connected'

View File

@ -55,7 +55,7 @@ class MainWindow(QtGui.QMainWindow):
"""Main window."""
def __init__(self, *args):
apply(QtGui.QMainWindow.__init__, (self,) + args)
QtGui.QMainWindow.__init__(*(self,) + args)
self.config = config.read()