What changed, and why it matters
This commit simply renames an internal variable from `dialog_label` to `_dialog_label` to mark it as private. It is a minor code cleanup with no visible behavior change and no security relevance.
No action required. This is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes all references to self.dialog_label to self._dialog_label in electrum/hw_wallet/qt.py. This is a naming convention change to indicate the attribute is private, following a prior commit (898a4c270). There are no functional or security changes.
Changed components
electrum/hw_wallet/qt.pyInspect captured patch +4 / −4
diff --git a/electrum/hw_wallet/qt.py b/electrum/hw_wallet/qt.py
index cb562ac..ee7c23e 100644
--- a/electrum/hw_wallet/qt.py
+++ b/electrum/hw_wallet/qt.py
@@ -84,7 +84,7 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger):
self.win = win
self.device = device
self.dialog = None
- self.dialog_label = None
+ self._dialog_label = None
self._dialog_on_cancel = None
self.done = threading.Event()
@@ -181,7 +181,7 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger):
# window-modal dialog each time is slow and visibly janky on macOS
# (the modal "sheet" animates closed/open between outputs). See #10718.
if self.dialog is not None and self._dialog_on_cancel == on_cancel:
- self.dialog_label.setText(msg)
+ self._dialog_label.setText(msg)
if not self.dialog.isVisible(): # e.g. was hidden by a user "cancel"
self.dialog.show()
return
@@ -191,7 +191,7 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger):
title = _('Please check your {} device').format(self.device)
self.dialog = dialog = WindowModalDialog(self.top_level_window(), title)
self._dialog_on_cancel = on_cancel
- self.dialog_label = label = QLabel(msg)
+ self._dialog_label = label = QLabel(msg)
label.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse)
vbox = QVBoxLayout(dialog)
vbox.addWidget(label)
@@ -209,7 +209,7 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger):
if self.dialog:
self.dialog.accept()
self.dialog = None
- self.dialog_label = None
+ self._dialog_label = None
self._dialog_on_cancel = None
def win_query_choice(self, msg: str, choices: Sequence[ChoiceItem]):
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.