From 7681864d81b855216b9253bc534c9644065e54fb Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 28 Feb 2013 02:15:06 +0100 Subject: [PATCH] Fix multiselect widget signal handling. Apparently list isn't allowed type of argument. Documentation says: "It is possible to pass any Python object as a signal argument by specifying PyQt_PyObject as the type of the argument in the signature." "While this would normally be used for passing objects like lists and dictionaries as signal arguments, it can be used for any Python type." So do it. --- qubesmanager/multiselectwidget.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qubesmanager/multiselectwidget.py b/qubesmanager/multiselectwidget.py index b373f43..e4281d0 100644 --- a/qubesmanager/multiselectwidget.py +++ b/qubesmanager/multiselectwidget.py @@ -6,8 +6,8 @@ from ui_multiselectwidget import * class MultiSelectWidget(Ui_MultiSelectWidget, QWidget): __pyqtSignals__ = ("selected_changed()",) - __pyqtSignals__ = ("items_added(list)",) - __pyqtSignals__ = ("items_removed(list)",) + __pyqtSignals__ = ("items_added(PyQt_PyObject)",) + __pyqtSignals__ = ("items_removed(PyQt_PyObject)",) def __init__(self, parent=None): super(MultiSelectWidget, self).__init__() @@ -31,9 +31,9 @@ class MultiSelectWidget(Ui_MultiSelectWidget, QWidget): dst.sortItems() self.emit(SIGNAL("selected_changed()")) if src is self.selected_list: - self.emit(SIGNAL("items_removed(list)"), items) + self.emit(SIGNAL("items_removed(PyQt_PyObject)"), items) else: - self.emit(SIGNAL("items_added(list)"), items) + self.emit(SIGNAL("items_added(PyQt_PyObject)"), items) def add_selected(self): self.switch_selected(self.available_list, self.selected_list) @@ -50,9 +50,9 @@ class MultiSelectWidget(Ui_MultiSelectWidget, QWidget): dst.sortItems() self.emit(SIGNAL("selected_changed()")) if src is self.selected_list: - self.emit(SIGNAL("items_removed(list)"), items) + self.emit(SIGNAL("items_removed(PyQt_PyObject)"), items) else: - self.emit(SIGNAL("items_added(list)"), items) + self.emit(SIGNAL("items_added(PyQt_PyObject)"), items) def add_all(self):