qt: clean up initialize/shutdown signals #9834

pull benma wants to merge 1 commits into bitcoin:master from benma:exitcode changing 1 files +14 −15
  1. benma commented at 8:25 AM on February 23, 2017: none
    • Change initializeResult(int) to initializeResult(bool) to avoid implicit type conversion.
    • Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers.
    • Remove the argument from shutdownResult(int); it was called with a constant argument.
  2. qt: clean up initialize/shutdown signals
     - Change initializeResult(int) to initializeResult(bool) to avoid
       implicit type conversion.
     - Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers.
     - Remove the argument from shutdownResult(int); it was called with a
       constant argument.
    5b528d746c
  3. laanwj commented at 8:29 AM on February 23, 2017: member

    it was called with a constant argument.

    That seems like a bug. It should be called with 0 in case of an error. Though I guess shutdown can't really fail (without crashing).

  4. benma commented at 8:35 AM on February 23, 2017: none

    It emits a different signal in that case: runawayException, which calls exit(EXIT_FAILURE) instead of QT's quit().

  5. jonasschnelli added the label GUI on Feb 23, 2017
  6. laanwj commented at 9:41 AM on February 23, 2017: member

    Yes, indeed.

  7. benma commented at 6:08 AM on February 28, 2017: none

    @jonasschnelli could you please review this?

  8. in src/qt/bitcoin.cpp:None in 5b528d746c
     301 | @@ -302,7 +302,7 @@ void BitcoinCore::shutdown()
     302 |          threadGroup.join_all();
     303 |          Shutdown();
     304 |          qDebug() << __func__ << ": Shutdown finished";
     305 | -        Q_EMIT shutdownResult(1);
    


    jonasschnelli commented at 9:45 AM on February 28, 2017:

    Agree with @laanwj: This was a bug.


    benma commented at 1:31 AM on March 1, 2017:

    Was a bug, or is a bug? Because it is still not called with (0), and I am not sure under what circumstances it should be, seeing that the runaway exception signal is called when shutdown fails.


    jonasschnelli commented at 12:15 PM on March 1, 2017:

    The int return value was only use over qDebug which we can argue what it should have been there. But this PRs solution (remove the shutdown result value) seems to make most sense.

  9. jonasschnelli commented at 9:48 AM on February 28, 2017: contributor

    Tested ACK 5b528d746c841aa868a305f9c1a586f539b531cb

  10. MarcoFalke commented at 10:20 AM on February 28, 2017: member

    utACK 5b528d746c841aa868a305f9c1a586f539b531cb

  11. jonasschnelli merged this on Mar 2, 2017
  12. jonasschnelli closed this on Mar 2, 2017

  13. jonasschnelli referenced this in commit b00ba6251f on Mar 2, 2017
  14. benma commented at 9:33 AM on March 2, 2017: none

    Thanks everyone for the reviews and merge! :dancing_men:

  15. PastaPastaPasta referenced this in commit 73a42dadcd on Dec 28, 2018
  16. PastaPastaPasta referenced this in commit b5066f8db8 on Dec 29, 2018
  17. PastaPastaPasta referenced this in commit ad4754e04b on Dec 29, 2018
  18. PastaPastaPasta referenced this in commit f477703a9e on Dec 29, 2018
  19. PastaPastaPasta referenced this in commit 54b88b5751 on Dec 29, 2018
  20. PastaPastaPasta referenced this in commit 832f0c55be on Dec 31, 2018
  21. PastaPastaPasta referenced this in commit a9577bb028 on Dec 31, 2018
  22. PastaPastaPasta referenced this in commit dc9774886d on Jan 2, 2019
  23. PastaPastaPasta referenced this in commit fd24c03a95 on Jan 2, 2019
  24. PastaPastaPasta referenced this in commit 8710e6c9fc on Jan 3, 2019
  25. PastaPastaPasta referenced this in commit e85779671d on Jan 3, 2019
  26. PastaPastaPasta referenced this in commit 36be5f379f on Jan 5, 2019
  27. PastaPastaPasta referenced this in commit 0201b3dbd8 on Jan 5, 2019
  28. PastaPastaPasta referenced this in commit adf13960eb on Jan 7, 2019
  29. PastaPastaPasta referenced this in commit 63d22e5a4b on Jan 7, 2019
  30. PastaPastaPasta referenced this in commit 24e090a45b on Jan 7, 2019
  31. PastaPastaPasta referenced this in commit 10eb1c5a24 on Jan 7, 2019
  32. PastaPastaPasta referenced this in commit 904e56fb11 on Jan 23, 2019
  33. PastaPastaPasta referenced this in commit 8035769d47 on Jan 23, 2019
  34. PastaPastaPasta referenced this in commit 03329761db on Jan 25, 2019
  35. PastaPastaPasta referenced this in commit f525eb246b on Jan 25, 2019
  36. 2a5A1Ghu1 referenced this in commit 469679b54f on Oct 18, 2020
  37. squidicuzz referenced this in commit f57568d969 on Oct 28, 2020
  38. 2a5A1Ghu1 referenced this in commit 6b1fc78c6a on Oct 28, 2020
  39. 2a5A1Ghu1 referenced this in commit 92b8b6e212 on Oct 28, 2020
  40. 2a5A1Ghu1 referenced this in commit 1e0217eefd on Nov 2, 2020
  41. MarcoFalke 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-22 06:15 UTC

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