Fix regression in “Encrypt Wallet” menu item #393

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210803-encrypt changing 1 files +2 −2
  1. hebasto commented at 7:29 pm on August 3, 2021: member

    Fix #392.

    Adding a new item to the m_wallet_selector must follow the establishment of a connection between the WalletView::encryptionStatusChanged signal and the BitcoinGUI::updateWalletStatus slot.

    This was a regression introduced in https://github.com/bitcoin/bitcoin/commit/20e2e24e90d782219e853ef0676ac66dc6a9de6a (#29).


    An encrypted wallet being auto-loaded at the GUI startup:

    • on master (eaf09bda4ab21f79f89822d2c6fa3d7a3ce57b0d)

    Screenshot from 2021-08-03 22-38-49

    • with this PR

    Screenshot from 2021-08-03 22-34-58

  2. qt: Fix regression in "Encrypt Wallet" menu item
    Adding a new item to the m_wallet_selector must follow the establishment
    of signal-slot connections.
    d54d949598
  3. hebasto added this to the milestone 22.0 on Aug 3, 2021
  4. hebasto added the label Bug on Aug 3, 2021
  5. hebasto added the label UX on Aug 3, 2021
  6. hebasto added the label Needs backport (22.x) on Aug 3, 2021
  7. hebasto commented at 7:45 pm on August 3, 2021: member
  8. achow101 commented at 10:40 pm on August 3, 2021: member

    ACK d54d94959869b0c363939163b99ba0475751dcb6

    Tested that this fixes the issue.

    For those wondering why this fixes the issue, m_wallet_selector->addItem ends up calling a lot of setup functions and emits several signals. One of those signals is encryptionStatusChanged. However previously this signal was not connected to its slot so when that signal was emitted, it did not have the intended effect of greying out the Encrypt Wallet option. By moving addItem to after all of the signals have been connected, the signal will be correctly handled.

  9. hebasto added the label Wallet on Aug 4, 2021
  10. jarolrod commented at 6:42 am on August 5, 2021: member

    ACK d54d94959869b0c363939163b99ba0475751dcb6

    Tested on macOS 12 and Ubuntu 20.4.02

    The related code is a bit entangled, but I have ensured that this is correct in its implementation and is a good way to fix the issue. Below are screenshots comparing master and this PR:

    Master. PR.

    This was tested by starting with an already encrypted wallet. On the master branch, we can notice the issue described in #392. On the PR branch, we can see that this is fixed.

  11. hebasto merged this on Aug 5, 2021
  12. hebasto closed this on Aug 5, 2021

  13. hebasto deleted the branch on Aug 5, 2021
  14. hebasto referenced this in commit 98369d8519 on Aug 5, 2021
  15. hebasto commented at 7:01 am on August 5, 2021: member
  16. hebasto removed the label Needs backport (22.x) on Aug 5, 2021
  17. sidhujag referenced this in commit a4f8ab0c72 on Aug 5, 2021
  18. hebasto referenced this in commit f20bbdc93e on Aug 5, 2021
  19. hebasto referenced this in commit c7a003083a on Aug 6, 2021
  20. hebasto referenced this in commit a2ac4f020e on Aug 6, 2021
  21. hebasto referenced this in commit 0d7f06d9ff on Aug 6, 2021
  22. hebasto referenced this in commit 8e67850103 on Aug 7, 2021
  23. hebasto referenced this in commit d0010f5652 on Aug 9, 2021
  24. hebasto referenced this in commit 0ae7dd897e on Aug 9, 2021
  25. hebasto referenced this in commit 76f3e8751d on Aug 19, 2021
  26. hebasto referenced this in commit eb6777222f on Aug 20, 2021
  27. hebasto referenced this in commit 0ffa79aace on Aug 20, 2021
  28. hebasto referenced this in commit e9b4487684 on Aug 20, 2021
  29. laanwj referenced this in commit 4a25e39624 on Aug 26, 2021
  30. fujicoin referenced this in commit e63c997332 on Aug 27, 2021
  31. gwillen referenced this in commit 980a8b8da7 on Jul 27, 2022
  32. gwillen referenced this in commit 61e168957d on Aug 1, 2022
  33. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 02:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me