Remove second arg from on_selection_changed.
The deselected argument was unused, so remove it from the signal and the slot.
This commit is contained in:
parent
e8f73b0fe6
commit
fbadc5e668
@ -241,8 +241,8 @@ class Completer(QObject):
|
|||||||
else:
|
else:
|
||||||
return s
|
return s
|
||||||
|
|
||||||
@pyqtSlot(QItemSelection, QItemSelection)
|
@pyqtSlot(QItemSelection)
|
||||||
def on_selection_changed(self, selected, _deselected):
|
def on_selection_changed(self, selected):
|
||||||
"""Change the completed part if a new item was selected.
|
"""Change the completed part if a new item was selected.
|
||||||
|
|
||||||
Called from the views selectionChanged method.
|
Called from the views selectionChanged method.
|
||||||
|
@ -104,7 +104,7 @@ class CompletionView(QTreeView):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
resize_completion = pyqtSignal()
|
resize_completion = pyqtSignal()
|
||||||
selection_changed = pyqtSignal(QItemSelection, QItemSelection)
|
selection_changed = pyqtSignal(QItemSelection)
|
||||||
|
|
||||||
def __init__(self, win_id, parent=None):
|
def __init__(self, win_id, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
@ -255,7 +255,7 @@ class CompletionView(QTreeView):
|
|||||||
def selectionChanged(self, selected, deselected):
|
def selectionChanged(self, selected, deselected):
|
||||||
"""Extend selectionChanged to call completers selection_changed."""
|
"""Extend selectionChanged to call completers selection_changed."""
|
||||||
super().selectionChanged(selected, deselected)
|
super().selectionChanged(selected, deselected)
|
||||||
self.selection_changed.emit(selected, deselected)
|
self.selection_changed.emit(selected)
|
||||||
|
|
||||||
def resizeEvent(self, e):
|
def resizeEvent(self, e):
|
||||||
"""Extend resizeEvent to adjust column size."""
|
"""Extend resizeEvent to adjust column size."""
|
||||||
|
@ -216,6 +216,6 @@ def test_on_selection_changed(before, newtxt, count, quick_complete, after,
|
|||||||
_set_cmd_prompt(status_command_stub, before)
|
_set_cmd_prompt(status_command_stub, before)
|
||||||
# schedule_completion_update is needed to pick up the cursor position
|
# schedule_completion_update is needed to pick up the cursor position
|
||||||
completer_obj.schedule_completion_update()
|
completer_obj.schedule_completion_update()
|
||||||
completer_obj.on_selection_changed(selection, None)
|
completer_obj.on_selection_changed(selection)
|
||||||
model.data.assert_called_with(indexes[0])
|
model.data.assert_called_with(indexes[0])
|
||||||
_validate_cmd_prompt(status_command_stub, after)
|
_validate_cmd_prompt(status_command_stub, after)
|
||||||
|
Loading…
Reference in New Issue
Block a user