-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt: function filterAcceptsRow seems to be unused #18860
Comments
The function is virtual, see https://doc.qt.io/qt-5/qsortfilterproxymodel.html#filterAcceptsRow |
Ok, now I understand. |
|
Yes, I see it. In several places. Qt Framework magic. |
@brakmic If you want to investigate unused functions generally in our code base then you might want to take a look at #18670 (comment) :) |
Wow, that's an impressive collection you have there. :) |
Having |
Please note that the list in #18670 (comment) is only a subset all unused functions. Proof: |
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.
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.
The text was updated successfully, but these errors were encountered: