[Qt] BitcoinGUI: connect to message() signal from wallet model #3169

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:bitcoingui_con_mess_walletmodel changing 2 files +7 −4
  1. Diapolo commented at 8:19 PM on October 27, 2013: none
    • directly connect to message() signal from wallet model in the main GUI to reduce complexity of the slot/signal handling for message()
  2. [Qt] BitcoinGUI: connect to message() signal from wallet model
    - directly connect to message() signal from wallet model in the main GUI
      to reduce complexity of the slot/signal handling for message()
    5b1ff9fe9c
  3. BitcoinPullTester commented at 9:39 PM on October 27, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/5b1ff9fe9c824220422937140d345250f6b2bc17 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. laanwj commented at 6:44 AM on October 28, 2013: member

    It makes conceptual sense for Wallet_View_ to subscribe to the Wallet_Model_. I don't really like this change, sorry.

  5. laanwj closed this on Oct 28, 2013

  6. in src/qt/bitcoingui.cpp:None in 5b1ff9fe9c
     333 | @@ -334,7 +334,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
     334 |          setNumBlocks(clientModel->getNumBlocks(), clientModel->getNumBlocksOfPeers());
     335 |          connect(clientModel, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int)));
     336 |  
     337 | -        // Receive and report messages from network/worker thread
     338 | +        // Receive and report messages from client model
     339 |          connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
    


    Diapolo commented at 7:06 AM on October 28, 2013:

    Seems I still have problems understanding your idea ^^. Take a look at this line, BitcoinGUI subscribing to clientModel. Your idea is WalletView -> WalletModel is logical and BitcoinGUI -> ClientModel also then? I'm fine with closing this pull, as long as I'm able to follow you :).


    laanwj commented at 7:34 AM on October 28, 2013:

    Well it is the responsibility for the WalletView to subscribe to its specific WalletModel. There is a one to one relationship between them. And there can be multiple pairs of WalletViews and WalletModels. Making BitcoinGUI subscribe to every WalletModel is hence a bit strange and complicates handling.

    There is also a one to one correspondence between BitcoinGUI and ClientModel. There is only one client connection, and one BitcoinGUI.

    If you don't understand, don't make changes to it, I'll handle this. There's enough concrete issues left to be solved.


    Diapolo commented at 8:09 AM on October 28, 2013:

    Makes totally sense now, thanks for taking the time!


    laanwj commented at 9:51 AM on October 28, 2013:

    Where that could come in useful is, for example, if we'd want to store the messages on a per-wallet basis. The walletview could do something else with the messages for a specific wallet.

  7. Bushstar referenced this in commit 589c892506 on Apr 8, 2020
  8. DrahtBot locked this on Sep 8, 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-04-21 18:16 UTC

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