fix: add missing errorText widget to change_passphrase.ui#2467
fix: add missing errorText widget to change_passphrase.ui#2467Fikri-20 wants to merge 4 commits intoborgbase:masterfrom
Conversation
_set_status() in ChangeBorgPassphraseWindow called self.errorText.setText() but the widget was absent from the UI file, causing an AttributeError crash when displaying errors after a keyring change. Adds the errorText QLabel (matching the pattern used in repo_add.ui) and a regression test that verifies _set_status() works without crashing. Fixes borgbase#2454
|
hey @m3nu , could you please review the PR and tell me if I need to tweak anything else? |
|
Hi @m3nu, I'm applying for GSoC 2026 and have these PR ready for review. Could you please take a look? |
m3nu
left a comment
There was a problem hiding this comment.
Looks good — the fix is correct and the test covers the regression.
Minor nits (non-blocking):
-
scaledContentson theerrorTextQLabel is a no-op (only applies to pixmap content). It's fine since it's copied fromrepo_add.uifor consistency, but could be dropped in a future cleanup. -
Worth noting: the patch originated from the issue reporter in #2454. Good on you for formalizing it as a PR with a regression test.
|
Hi @m3nu |
|
Hey @m3nu, addressed your nit — dropped the |
Fixes #2454
What
ChangeBorgPassphraseWindow._set_status()callsself.errorText.setText(), but theerrorTextQLabel widget was missing fromchange_passphrase.ui. This caused anAttributeErrorcrash whenever an error needed to be displayed — for example, after changing the keyring provider and attempting to update a repo passphrase.Fix
Added the missing
errorTextQLabel tochange_passphrase.ui, using the same widget definition already present inrepo_add.ui.Test
Added a regression test
test_change_passphrase_window_error_textintests/unit/test_repo.pythat instantiates the window and verifies_set_status()sets and clears the error text without crashing.