Replace calls to "apply(f, args)" with "f(*args)"
This commit is contained in:
parent
141c8d304b
commit
67ae320438
@ -32,7 +32,7 @@ class AboutDialog(QtGui.QDialog):
|
|||||||
"""About dialog."""
|
"""About dialog."""
|
||||||
|
|
||||||
def __init__(self, name, messages, *args):
|
def __init__(self, name, messages, *args):
|
||||||
apply(QtGui.QDialog.__init__, (self,) + args)
|
QtGui.QDialog.__init__(*(self,) + args)
|
||||||
self.setModal(True)
|
self.setModal(True)
|
||||||
self.setWindowTitle(name)
|
self.setWindowTitle(name)
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class GenericListWidget(QtGui.QListWidget):
|
|||||||
"""Generic QListWidget with dynamic size."""
|
"""Generic QListWidget with dynamic size."""
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
apply(QtGui.QListWidget.__init__, (self,) + args)
|
QtGui.QListWidget.__init__(*(self,) + args)
|
||||||
self.setMaximumWidth(100)
|
self.setMaximumWidth(100)
|
||||||
self.setTextElideMode(QtCore.Qt.ElideNone)
|
self.setTextElideMode(QtCore.Qt.ElideNone)
|
||||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
@ -52,17 +52,17 @@ class GenericListWidget(QtGui.QListWidget):
|
|||||||
|
|
||||||
def clear(self, *args):
|
def clear(self, *args):
|
||||||
"""Re-implement clear to set dynamic size after clear."""
|
"""Re-implement clear to set dynamic size after clear."""
|
||||||
apply(QtGui.QListWidget.clear, (self,) + args)
|
QtGui.QListWidget.clear(*(self,) + args)
|
||||||
self.auto_resize()
|
self.auto_resize()
|
||||||
|
|
||||||
def addItem(self, *args):
|
def addItem(self, *args):
|
||||||
"""Re-implement addItem to set dynamic size after add."""
|
"""Re-implement addItem to set dynamic size after add."""
|
||||||
apply(QtGui.QListWidget.addItem, (self,) + args)
|
QtGui.QListWidget.addItem(*(self,) + args)
|
||||||
self.auto_resize()
|
self.auto_resize()
|
||||||
|
|
||||||
def insertItem(self, *args):
|
def insertItem(self, *args):
|
||||||
"""Re-implement insertItem to set dynamic size after insert."""
|
"""Re-implement insertItem to set dynamic size after insert."""
|
||||||
apply(QtGui.QListWidget.insertItem, (self,) + args)
|
QtGui.QListWidget.insertItem(*(self,) + args)
|
||||||
self.auto_resize()
|
self.auto_resize()
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ class BufferListWidget(GenericListWidget):
|
|||||||
"""Widget with list of buffers."""
|
"""Widget with list of buffers."""
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
apply(GenericListWidget.__init__, (self,) + args)
|
GenericListWidget.__init__(*(self,) + args)
|
||||||
|
|
||||||
def switch_prev_buffer(self):
|
def switch_prev_buffer(self):
|
||||||
if self.currentRow() > 0:
|
if self.currentRow() > 0:
|
||||||
|
@ -35,7 +35,7 @@ class ChatTextEdit(QtGui.QTextEdit):
|
|||||||
"""Chat area."""
|
"""Chat area."""
|
||||||
|
|
||||||
def __init__(self, debug, *args):
|
def __init__(self, debug, *args):
|
||||||
apply(QtGui.QTextEdit.__init__, (self,) + args)
|
QtGui.QTextEdit.__init__(*(self,) + args)
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
self.readOnly = True
|
self.readOnly = True
|
||||||
self.setFocusPolicy(QtCore.Qt.NoFocus)
|
self.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
|
@ -31,7 +31,7 @@ class ConnectionDialog(QtGui.QDialog):
|
|||||||
"""Connection window with server/port/password fields."""
|
"""Connection window with server/port/password fields."""
|
||||||
|
|
||||||
def __init__(self, values, *args):
|
def __init__(self, values, *args):
|
||||||
apply(QtGui.QDialog.__init__, (self,) + args)
|
QtGui.QDialog.__init__(*(self,) + args)
|
||||||
self.values = values
|
self.values = values
|
||||||
self.setModal(True)
|
self.setModal(True)
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class DebugDialog(QtGui.QDialog):
|
|||||||
"""Debug dialog."""
|
"""Debug dialog."""
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
apply(QtGui.QDialog.__init__, (self,) + args)
|
QtGui.QDialog.__init__(*(self,) + args)
|
||||||
self.resize(640, 480)
|
self.resize(640, 480)
|
||||||
self.setWindowTitle('Debug console')
|
self.setWindowTitle('Debug console')
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class Network(QtCore.QObject):
|
|||||||
messageFromWeechat = qt_compat.Signal(QtCore.QByteArray)
|
messageFromWeechat = qt_compat.Signal(QtCore.QByteArray)
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
apply(QtCore.QObject.__init__, (self,) + args)
|
QtCore.QObject.__init__(*(self,) + args)
|
||||||
self.status_disconnected = 'disconnected'
|
self.status_disconnected = 'disconnected'
|
||||||
self.status_connecting = 'connecting...'
|
self.status_connecting = 'connecting...'
|
||||||
self.status_connected = 'connected'
|
self.status_connected = 'connected'
|
||||||
|
@ -55,7 +55,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
"""Main window."""
|
"""Main window."""
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
apply(QtGui.QMainWindow.__init__, (self,) + args)
|
QtGui.QMainWindow.__init__(*(self,) + args)
|
||||||
|
|
||||||
self.config = config.read()
|
self.config = config.read()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user