Alternative to #14713.
Instead of depending on clang formatter to not reorder includes, another fix is to explicitly include the missing header file.
utACK 27154ce765971619efcd2ee59384c549957711f5
utACK 27154ce765971619efcd2ee59384c549957711f5 (seems to be the cleaner solution then #14713)
@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.
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
utACK 27154ce.
utACK 27154ce765971619efcd2ee59384c549957711f5
Welcome as a contributor @1Il1! :-)
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