fix: rename dragEventEnter to dragEnterEvent in CapaExplorerRulegenEditor

Qt dispatches drag-enter events to dragEnterEvent; the misspelled method
dragEventEnter was dead code and its super() call would raise AttributeError
if ever reached.
This commit is contained in:
Willi Ballenthin
2026-04-22 20:17:27 +03:00
committed by Willi Ballenthin
parent 1f6b9082a4
commit 2eb2cb2e49
2 changed files with 3 additions and 12 deletions
+1 -2
View File
@@ -48,8 +48,7 @@
- fix: remove unreachable backports.functools_lru_cache fallback and dead dependency @williballenthin
- fix: Scopes.from_dict uses cls instead of self so subclasses return the correct type @williballenthin
- fix: correct wrong dict key in VMRay _compute_monitor_threads assertion (used thread_id instead of process_id) @williballenthin
fix: replace assert with isinstance guard in get_callee for invalid MethodSpec tokens @williballenthin
- fix: replace assert with isinstance guard in get_callee for invalid MethodSpec tokens @williballenthin
- fix: rename dragEventEnter to dragEnterEvent so Qt dispatches drag-enter events correctly in CapaExplorerRulegenEditor @williballenthin (SURF-64)
- fix: guard against None in lessThan else-branch so sorting columns with empty cells does not raise AttributeError @williballenthin (SURF-63)
- fix: add explicit import capa.loader in form.py to avoid fragile transitive import dependency @williballenthin (SURF-62)
- fix: initialize f=None before try block in load_capa_function_results to prevent UnboundLocalError in except handler @williballenthin (SURF-61)
+2 -10
View File
@@ -237,7 +237,7 @@ class CapaExplorerRulegenPreview(QtWidgets.QTextEdit):
# determine lineno for first selected line, and column
cur.setPosition(select_start_ppos)
start_lineno = self.count_previous_lines_from_block(cur.block())
start_lineco = cur.columnNumber()
start_colno = cur.columnNumber()
# determine lineno for last selected line
cur.setPosition(select_end_ppos)
@@ -282,7 +282,7 @@ class CapaExplorerRulegenPreview(QtWidgets.QTextEdit):
select_end_ppos += (lines_modified * len(self.INDENT)) + len(self.INDENT)
elif lines_modified:
# user SHIFT + Tab, decrease selection positions
if start_lineco not in (0, 1) and first_modified:
if start_colno not in (0, 1) and first_modified:
# only decrease start position if not in first column
select_start_ppos -= len(self.INDENT)
select_end_ppos -= lines_modified * len(self.INDENT)
@@ -378,14 +378,6 @@ class CapaExplorerRulegenEditor(QtWidgets.QTreeWidget):
""" """
return 2
def dragMoveEvent(self, e):
""" """
super().dragMoveEvent(e)
def dragEventEnter(self, e):
""" """
super().dragEventEnter(e)
def dropEvent(self, e):
""" """
if not self.indexAt(e.pos()).isValid():