gui: Refactor open wallet activity #15478

pull promag wants to merge 1 commits into bitcoin:master from promag:2019-02-refactor-open-wallet changing 3 files +106 −55
  1. promag commented at 7:50 PM on February 25, 2019: member

    This PR changes the thread of the OpenWalletActivity, from the wallet controller thread to the GUI thread. The actual opening is still executed in the wallet controller thread, but in a different way. Considering the current minimum Qt version, the best way to run a function in a different thread is to use QTimer::singleShot(0, worker, () { ... }) where worker is an object in a different thread. With Qt 5.10, the correct way is to use QMetaObject::invokeMethod.

    This change also removes from bitcoingui.cpp the handling of loading messages and progress dialog.

  2. promag force-pushed on Feb 25, 2019
  3. fanquake added the label GUI on Feb 25, 2019
  4. DrahtBot commented at 11:00 PM on February 25, 2019: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15450 ([GUI] Create wallet menu option by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. in src/qt/walletcontroller.cpp:200 in 509f8fb795 outdated
     210 | +
     211 | +        called = QMetaObject::invokeMethod(this, "hideProgress", Qt::BlockingQueuedConnection);
     212 | +        assert(called);
     213 | +
     214 | +        if (!warning.empty()) {
     215 | +            bool called = QMetaObject::invokeMethod(this, "showMessage", Qt::BlockingQueuedConnection,
    


    practicalswift commented at 8:50 AM on February 26, 2019:

    called here shadows called in outer scope.

  6. in src/qt/walletcontroller.h:76 in 509f8fb795 outdated
      72 | @@ -72,19 +73,28 @@ class OpenWalletActivity : public QObject
      73 |      Q_OBJECT
      74 |  
      75 |  public:
      76 | -    OpenWalletActivity(WalletController* wallet_controller, const std::string& name);
      77 | +    OpenWalletActivity(QWidget* parent = nullptr);
    


    practicalswift commented at 8:51 AM on February 26, 2019:

    Should be explicit :-)

    Please help review #14505 to enable automatic non-human explicit checking :-)

  7. DrahtBot added the label Needs rebase on Feb 27, 2019
  8. fanquake cross-referenced this on Mar 2, 2019 from issue Starting bitcoin-qt with -nowallet and then opening a wallet does not show the wallet by achow101
  9. jonasschnelli commented at 6:23 AM on March 15, 2019: contributor

    Concept ACK, needs rebase.

  10. promag force-pushed on Mar 17, 2019
  11. DrahtBot removed the label Needs rebase on Mar 18, 2019
  12. DrahtBot added the label Needs rebase on Mar 22, 2019
  13. gui: Refactor open wallet activity 28aa82ff99
  14. promag renamed this:
    wip: gui: Refactor open wallet activity
    gui: Refactor open wallet activity
    on May 28, 2019
  15. promag force-pushed on May 28, 2019
  16. promag commented at 9:47 AM on May 28, 2019: member

    Rebased.

  17. DrahtBot removed the label Needs rebase on May 28, 2019
  18. promag cross-referenced this on May 30, 2019 from issue gui: Create wallet menu option by achow101
  19. promag closed this on Jun 14, 2019

  20. promag deleted the branch on Jun 14, 2019
  21. promag cross-referenced this on Jun 14, 2019 from issue gui: Refactor wallet controller activities by promag
  22. bitcoin locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC