tests: util.h: explicitly include required QString header #14714

pull 1Il1 wants to merge 1 commits into bitcoin:master from 1Il1:patch-3 changing 1 files +2 −0
  1. 1Il1 commented at 7:50 AM on November 13, 2018: contributor

    Alternative to #14713.

    Instead of depending on clang formatter to not reorder includes, another fix is to explicitly include the missing header file.

  2. util.h: explicitly include required QString header 27154ce765
  3. ken2812221 commented at 8:16 AM on November 13, 2018: contributor

    utACK 27154ce765971619efcd2ee59384c549957711f5

  4. jonasschnelli commented at 8:31 AM on November 13, 2018: contributor

    utACK 27154ce765971619efcd2ee59384c549957711f5 (seems to be the cleaner solution then #14713)

  5. 1Il1 commented at 8:37 AM on November 13, 2018: contributor

    @jonasschnelli Agreed. I do think the inability to find the main header file is a problem. There is a "regexp for main header file" configuration option as well. Will look into that.

  6. Empact commented at 9:34 AM on November 13, 2018: member

    utACK 27154ce

    BTW this is the prefered solution as per the developer notes:

    Every .cpp and .h file should #include every header file it directly uses classes, functions or other definitions from, even if those headers are already included indirectly through other headers.

    Rationale: Excluding headers because they are already indirectly included results in compilation failures when those indirect dependencies change. Furthermore, it obscures what the real code dependencies are.

    https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md

  7. promag commented at 9:51 AM on November 13, 2018: member

    utACK 27154ce.

  8. practicalswift commented at 10:20 AM on November 13, 2018: contributor

    utACK 27154ce765971619efcd2ee59384c549957711f5

    Welcome as a contributor @1Il1! :-)

  9. laanwj commented at 1:40 PM on November 13, 2018: member

    I was afraid for a moment and thought you meant the old src/util.h, which definitely shouldn't include Qt headers

    utACK https://github.com/bitcoin/bitcoin/pull/14714/commits/27154ce765971619efcd2ee59384c549957711f5 ofcourse

  10. laanwj added the label GUI on Nov 13, 2018
  11. laanwj added the label Tests on Nov 13, 2018
  12. laanwj renamed this:
    util.h: explicitly include required QString header
    tests: util.h: explicitly include required QString header
    on Nov 13, 2018
  13. laanwj merged this on Nov 13, 2018
  14. laanwj closed this on Nov 13, 2018

  15. laanwj referenced this in commit c51e1516a9 on Nov 13, 2018
  16. 1Il1 deleted the branch on Nov 13, 2018
  17. PastaPastaPasta referenced this in commit f250c6c5c1 on Jun 27, 2021
  18. PastaPastaPasta referenced this in commit 01331e6d5f on Jun 28, 2021
  19. PastaPastaPasta referenced this in commit 43acdb32a5 on Jun 29, 2021
  20. PastaPastaPasta referenced this in commit 7f10f29793 on Jul 1, 2021
  21. PastaPastaPasta referenced this in commit ae3730b80d on Jul 1, 2021
  22. PastaPastaPasta referenced this in commit 5e7366696d on Jul 1, 2021
  23. UdjinM6 referenced this in commit 6d47587d9d on Jul 5, 2021
  24. 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:15 UTC

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