More PyQt6 nonsense

QCombobox::activated[str] no longer exists renamed to
QComboBox::textActivated
This commit is contained in:
Kovid Goyal 2021-11-21 10:17:42 +05:30
parent 71e50bbaf7
commit 749d222579
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 5 deletions

View file

@ -131,7 +131,7 @@ def __init__(self, parent=None, add_clear_action=True, as_url=None):
self.line_edit.key_pressed.connect(self.key_pressed, type=Qt.ConnectionType.DirectConnection)
# QueuedConnection as workaround for https://bugreports.qt-project.org/browse/QTBUG-40807
self.activated[native_string_type].connect(self.history_selected, type=Qt.ConnectionType.QueuedConnection)
self.textActivated.connect(self.history_selected, type=Qt.ConnectionType.QueuedConnection)
self.setEditable(True)
self.as_you_type = True
self.timer = QTimer()
@ -282,7 +282,7 @@ def block_signals(self, yes):
def set_search_string(self, txt, store_in_history=False, emit_changed=True):
if not store_in_history:
self.activated[native_string_type].disconnect()
self.textActivated.disconnect()
try:
self.setFocus(Qt.FocusReason.OtherFocusReason)
if not txt:
@ -302,7 +302,7 @@ def set_search_string(self, txt, store_in_history=False, emit_changed=True):
finally:
if not store_in_history:
# QueuedConnection as workaround for https://bugreports.qt-project.org/browse/QTBUG-40807
self.activated[native_string_type].connect(self.history_selected, type=Qt.ConnectionType.QueuedConnection)
self.textActivated.connect(self.history_selected, type=Qt.ConnectionType.QueuedConnection)
def search_as_you_type(self, enabled):
self.as_you_type = enabled
@ -334,7 +334,7 @@ def __init__(self, parent=None):
self.line_edit = SearchLineEdit(self)
self.setLineEdit(self.line_edit)
self.line_edit.key_pressed.connect(self.key_pressed, type=Qt.ConnectionType.DirectConnection)
self.activated[native_string_type].connect(self.saved_search_selected)
self.textActivated.connect(self.saved_search_selected)
# Turn off auto-completion so that it doesn't interfere with typing
# names of new searches.

View file

@ -642,7 +642,7 @@ def __init__(self, parent):
self.current_find_position = None
self.search_button.clicked.connect(self.find)
self.item_search.lineEdit().textEdited.connect(self.find_text_changed)
self.item_search.activated[str].connect(self.do_find)
self.item_search.textActivated.connect(self.do_find)
# The tags view
parent.tags_view = TagsView(parent)