I have read in @practicalswift 's Issue #18858 that there was an unused function found, so I thought, I could maybe also run a few simple searches through the code. Just for the sake of learning. For that I used cppcheck.
cppcheck --enable=unusedFunction src/qt
Of course, there are many false positives, but one function seems to be lying dormant for quite a long time: filterAcceptsRow from qt/transactionfilterproxy.cpp.
Also, there is another one in addressbookpage.cpp. However, this one seems to have only a definition. I could not find its corresponding class member declaration. Not sure why, but there isn't one in addressbookpage.h.
Another interesting aspect is, that filterAcceptsRow from transactionfilterproxy.cpp was present since 0.15, without ever having been used, if I am not mistaken. And there were no changes until 0.17, when the other variant from addressbookpage.cpp got implemented.
I don't understand the reasons, and it could be that I am simply missing the forest for the trees, but I could compile, run and also qt-test my modified code without any failure. That is, without having compiled filterAcceptsRow in both of the classes.
However, before opening a PR, I would like to ask experienced people for advice. Is there anything that I might have been missed? Do these functions maybe exist for testing purposes only?
Regards,
---EDIT:
There are a few more of them, but I did not check them thoroughly. Will have to recompile/retest the code first.
src/qt/rpcconsole.cpp:123:0: style: The function 'Name' is never used. [unusedFunction]
^
src/qt/rpcconsole.cpp:124:0: style: The function 'NewTimer' is never used. [unusedFunction]
^
src/qt/bitcoinamountfield.cpp:45:0: style: The function 'fixup' is never used. [unusedFunction]
^
src/qt/bitcoinamountfield.cpp:67:0: style: The function 'stepBy' is never used. [unusedFunction]
^
src/qt/bitcoinamountfield.cpp:167:0: style: The function 'stepEnabled' is never used. [unusedFunction]